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

fix all flaky tests #628

Merged
merged 13 commits into from
May 13, 2020
Merged

fix all flaky tests #628

merged 13 commits into from
May 13, 2020

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented May 6, 2020

fixes #623
fixes #541
fixes #517

Stebalien added 5 commits May 5, 2020 17:50
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.
@Stebalien Stebalien force-pushed the test/fix-hung-test branch from 6885b27 to 6c70c2f Compare May 6, 2020 00:51
@Stebalien Stebalien requested a review from aarshkshah1992 May 6, 2020 01:46
ext_test.go Outdated
Comment on lines 50 to 53
// 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)
}
Copy link
Contributor

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)

Copy link
Contributor

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.

Copy link
Member Author

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).

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

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.

ext_test.go Outdated Show resolved Hide resolved
ext_test.go Outdated Show resolved Hide resolved
@Stebalien Stebalien requested a review from aschmahmann May 6, 2020 05:05
@Stebalien Stebalien merged commit 9be7169 into master May 13, 2020
@Stebalien Stebalien deleted the test/fix-hung-test branch May 13, 2020 00:26
@Stebalien Stebalien mentioned this pull request May 26, 2020
77 tasks
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.

TestHungRequest is flaky TestFindPeerQuery fails TestGetFailures test is extremely flaky
2 participants