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

chore: add more tests for discovery #39

Merged
merged 2 commits into from
Oct 17, 2022
Merged

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Oct 13, 2022

Closes #18. May add more to this but can iterate later on too.

Adds tests for:

  • Replication over mDNS
  • Ensuring that connections are made over valid discovery mechanism

@achou11 achou11 requested a review from sethvincent October 13, 2022 19:09

const keyPair = createCoreKeyPair('stress test')

const instances = Array(20)
Copy link
Contributor

Choose a reason for hiding this comment

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

out of curiousity I tried increasing this number and after about 75 the tests will start to hang without showing errors. not a blocker at all just kinda interesting!

we might want to explore whether that's a network limitation or a number of mdns/dht servers on a device limitation, but that's outside the scope of this pr. I think 20 is a good number for this.

Copy link
Contributor

@sethvincent sethvincent left a comment

Choose a reason for hiding this comment

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

this is great! i added one note that we might decide to make an issue for but i think this is ready to merge. if we come up with other discovery tests i think we can make issues for those as we think of them.

@achou11 achou11 merged commit e1b1b8b into main Oct 17, 2022
@achou11 achou11 deleted the 18/more-discovery-tests branch October 17, 2022 15:10
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.

write additional tests for discovery.js module
2 participants