Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

fix(tests): stabilize unreliable session tests #44

Merged
merged 2 commits into from
Dec 19, 2018

Conversation

hannahhoward
Copy link
Contributor

Goals

fix #43

Implementation

Stop relying on timeouts for concurrency and use go sync primitives

@ghost ghost assigned hannahhoward Dec 18, 2018
@ghost ghost added the status/in-progress In progress label Dec 18, 2018
@@ -188,14 +186,7 @@ func TestSessionFindMorePeers(t *testing.T) {
<-cancelReqs

// wait long enough for a tick to occur

Choose a reason for hiding this comment

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

This comment isn't quite right anymore, but not that very wrong.

func (fcm *fakeConnManager) UntagPeer(p peer.ID, tag string) {
fcm.wait.Done()

Choose a reason for hiding this comment

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

You might want to defer this or put it after the removal from fcm.taggedPeers otherwise you might get a test failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh right. got it.

@hannahhoward hannahhoward merged commit 916de59 into master Dec 19, 2018
@ghost ghost removed the status/in-progress In progress label Dec 19, 2018
@Stebalien Stebalien deleted the bugs/stabilize-test-suite branch December 19, 2018 05:00
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
…uite

fix(tests): stabilize unreliable session tests

This commit was moved from ipfs/go-bitswap@916de59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test suite unstable on CI after bitswap refactor
2 participants