-
Notifications
You must be signed in to change notification settings - Fork 233
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
fix all flaky tests #628
fix all flaky tests #628
Conversation
Also, fail if the routing tables aren't well-formed. It turns out there were a couple of issues with this test: 1. It used too many file descriptors. 2. It tried to query the DHT without bootstrapping any nodes. That's never going to work.
6885b27
to
6c70c2f
Compare
Just wait for peers to fill up the routing table.
ext_test.go
Outdated
// Wait at most 100ms for a peer in our routing table. | ||
for i := 0; i < 100 && d.routingTable.Size() == 0; i++ { | ||
time.Sleep(10 * time.Millisecond) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test still fails: #623 (comment). I got
=== RUN TestHungRequest
TestHungRequest: ext_test.go:69: expected to fail with deadline exceeded, got: %!s(<nil>)
TestHungRequest: ext_test.go:73: GetClosestPeers should not have returned yet failed to find any peer
in table
TestHungRequest: ext_test.go:83: expected peers in the routing table
--- FAIL: TestHungRequest (1.16s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this was failing for me, but maybe I had some stale state. Will try and run the test more times and report back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You definitely had the change ("expected peers in the routing table" is new).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you were probably right about the identify race.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k, just as a heads up though it's much harder to reproduce the error locally now then previously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I've fixed it now by just not connecting till everything has been setup.
fixes #623
fixes #541
fixes #517