Skip to content

Commit 297911c

Browse files
committed
test: fix TestHungRequest by connecting late
1 parent 906ac8f commit 297911c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestHungRequest(t *testing.T) {
2828
ctx, cancel := context.WithCancel(context.Background())
2929
defer cancel()
3030

31-
mn, err := mocknet.FullMeshConnected(ctx, 2)
31+
mn, err := mocknet.FullMeshLinked(ctx, 2)
3232
if err != nil {
3333
t.Fatal(err)
3434
}
@@ -47,6 +47,11 @@ func TestHungRequest(t *testing.T) {
4747
})
4848
}
4949

50+
err = mn.ConnectAllButSelf()
51+
if err != nil {
52+
t.Fatal("failed to connect peers", err)
53+
}
54+
5055
// Wait at a bit for a peer in our routing table.
5156
for i := 0; i < 100 && d.routingTable.Size() == 0; i++ {
5257
time.Sleep(10 * time.Millisecond)

0 commit comments

Comments
 (0)