Commit 297911ca authored by Steven Allen's avatar Steven Allen

test: fix TestHungRequest by connecting late

parent 906ac8f0
......@@ -28,7 +28,7 @@ func TestHungRequest(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
mn, err := mocknet.FullMeshConnected(ctx, 2)
mn, err := mocknet.FullMeshLinked(ctx, 2)
if err != nil {
t.Fatal(err)
}
......@@ -47,6 +47,11 @@ func TestHungRequest(t *testing.T) {
})
}
err = mn.ConnectAllButSelf()
if err != nil {
t.Fatal("failed to connect peers", err)
}
// Wait at a bit for a peer in our routing table.
for i := 0; i < 100 && d.routingTable.Size() == 0; i++ {
time.Sleep(10 * time.Millisecond)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment