Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e test case that checks publish-subscribe-query workflow across network nodes #44

Merged
merged 13 commits into from
Jul 11, 2022

Conversation

snormore
Copy link
Contributor

@snormore snormore commented Jun 30, 2022

Going to do another round or two on this before it's ready but putting it up for 👀 in the meantime

https://github.com/xmtp-labs/hq/issues/551

  • The test case is pretty straightforward; grab the list of network nodes from nodes.xmtp.com, spin up a client node for each, subscribe to a topic on each, publish a message to each, expect that the messages are received via the subscription, expect that the messages are available via query, across all the nodes
  • The test gets skipped in CI, and there's no automated running of it yet anywhere
  • Needed to update go-libp2p to latest version for feat: allow dialing wss peers using DNS multiaddrs libp2p/go-libp2p#1592
  • Moved some of the queryFrom and queryLoop logic into a store.Client because the Query interface on wakustore.Store was too restrictive with unexported fields on the args and results of it - it's also kind of weird that the logic that services requests was/is mixed together with the logic that makes requests / consumes the services of the protocol

I guess it's worth calling out that we can easily put a lot of messages into our dev/prod DBs with a continuous version of this, but I don't think we should optimize for avoiding intake of test data, and just make sure we have cleanup/maintenance code in place for invalid and known test topics in the DBs (https://github.com/xmtp-labs/hq/issues/609).

I'm not 100% sure how this kind of test works when clients need to authenticate, @jazzz maybe you can weigh in on that 🙏

@snormore snormore self-assigned this Jun 30, 2022
@snormore snormore requested review from a team and removed request for a team June 30, 2022 14:01
e2e/e2e_test.go Outdated Show resolved Hide resolved
store/client.go Outdated Show resolved Hide resolved
store/client.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mkobetic mkobetic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice. 👍

@snormore snormore merged commit ab3976b into main Jul 11, 2022
@snormore snormore deleted the e2e-tests branch July 11, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants