Skip to content

Commit

Permalink
fix flaky TestBackoffConnector test
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Feb 8, 2022
1 parent ddc3e2b commit e129017
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions p2p/discovery/backoff/backoffconnector_test.go
Expand Up @@ -79,6 +79,7 @@ func TestBackoffConnector(t *testing.T) {
bc.Connect(context.Background(), loadCh(hosts))
require.Eventually(t, func() bool { return len(primary.Network().Conns()) == len(hosts)-1 }, 3*time.Second, 10*time.Millisecond)

time.Sleep(100 * time.Millisecond) // give connection attempts time to complete (relevant when using multiple transports)
for _, c := range primary.Network().Conns() {
c.Close()
}
Expand Down

0 comments on commit e129017

Please sign in to comment.