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

improve bitswap tests #4499

Merged
merged 3 commits into from
Dec 16, 2017
Merged

improve bitswap tests #4499

merged 3 commits into from
Dec 16, 2017

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Dec 15, 2017

  • fix races in testnet
  • improve TestBasicBitswap (and make debugging it easier).

In attempt to debug #4374 and #4108.

Also fixes #2444.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
ConnectTo can be called concurrently from within bitswap.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@ghost ghost assigned Stebalien Dec 15, 2017
@ghost ghost added the status/in-progress In progress label Dec 15, 2017
fixes #2444

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Stebalien Stebalien added RFM need/review Needs a review and removed status/in-progress In progress RFM labels Dec 16, 2017
@@ -108,7 +108,7 @@ func TestLargeSwarm(t *testing.T) {
if detectrace.WithRace() {
// when running with the race detector, 500 instances launches
// well over 8k goroutines. This hits a race detector limit.
numInstances = 100
numInstances = 75
Copy link
Member Author

Choose a reason for hiding this comment

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

Max go routines with race detector: 8196.
Bitswap workers per peer: n^2.

75 means 75^2 = 5625

That gives us some healthy head-room for other random goroutines.

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

Sounds good to me, though I would really like to get rid of all the bitswap network interface stuff

@whyrusleeping whyrusleeping merged commit 2ea8d17 into master Dec 16, 2017
@whyrusleeping whyrusleeping deleted the fix/better-bitswap-test branch December 16, 2017 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bitswap tests fail when run with race detector
2 participants