Skip to content

Commit 63118f1

Browse files
committed
fixup! Bootstrapping test
1 parent bfa638e commit 63118f1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

p2p/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"crypto/rand"
55
"strings"
66
"testing"
7-
"time"
87

98
"github.com/libp2p/go-libp2p-core/crypto"
109
"github.com/libp2p/go-libp2p-core/peer"
@@ -88,8 +87,9 @@ func TestBootstrapping(t *testing.T) {
8887
err = client3.Start()
8988
assert.NoError(err)
9089

91-
// TODO(tzdybal): need a better way to check that connections are fine
92-
time.Sleep(1 * time.Second)
90+
assert.Equal(2, len(client1.host.Network().Peers()))
91+
assert.Equal(2, len(client2.host.Network().Peers()))
92+
assert.Equal(2, len(client3.host.Network().Peers()))
9393
}
9494

9595
func TestGetMultiaddr(t *testing.T) {

0 commit comments

Comments
 (0)