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

Commit

Permalink
test: fix another flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Mar 6, 2020
1 parent cc1224e commit 2e60342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/decision/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ func TestTaggingPeers(t *testing.T) {
}

func TestTaggingUseful(t *testing.T) {
peerSampleInterval := 2 * time.Millisecond
peerSampleInterval := 5 * time.Millisecond

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
Expand All @@ -1027,7 +1027,7 @@ func TestTaggingUseful(t *testing.T) {
if me.PeerTagger.count(me.Engine.tagUseful) != 1 {
t.Fatal("Peers should be tagged but weren't")
}
time.Sleep(peerSampleInterval * 8)
time.Sleep(peerSampleInterval * 10)
}

if me.PeerTagger.count(me.Engine.tagUseful) == 0 {
Expand Down

0 comments on commit 2e60342

Please sign in to comment.