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 racy and failing test cases #674

Merged
merged 4 commits into from
Jul 12, 2019
Merged

Fix racy and failing test cases #674

merged 4 commits into from
Jul 12, 2019

Conversation

raulk
Copy link
Member

@raulk raulk commented Jul 10, 2019

Fixes #671, fixes #672, and integrates a peerstore fix to prevent a race.

@@ -368,7 +374,7 @@ func TestStreamsStress(t *testing.T) {
ctx := context.Background()
nnodes := 100
if detectrace.WithRace() {
nnodes = 50
nnodes = 30
Copy link
Member Author

@raulk raulk Jul 10, 2019

Choose a reason for hiding this comment

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

This is OK (and even better) because we're stress testing streams, and reducing the host count increases stream density per host.

@raulk
Copy link
Member Author

raulk commented Jul 10, 2019

Tests are green 💚🎉 (although TestStreamsStress takes ages on Travis).

@raulk raulk changed the title Fix some test races Fix racy and failing test cases Jul 10, 2019
@raulk raulk marked this pull request as ready for review July 10, 2019 15:02
@raulk raulk requested review from Stebalien and vyzo and removed request for Stebalien July 10, 2019 15:02
p2p/net/mock/mock_test.go Outdated Show resolved Hide resolved
p2p/net/mock/mock_test.go Outdated Show resolved Hide resolved
p2p/net/mock/mock_test.go Outdated Show resolved Hide resolved
@raulk raulk requested a review from Stebalien July 10, 2019 17:32
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Thanks!

@raulk raulk merged commit 15764f7 into master Jul 12, 2019
@raulk raulk deleted the fix/test-races branch July 12, 2019 11:52
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.

TestStreamStress doesn't wait for the test to finish TestStreamStress failing with race detector
2 participants