From 4780c65171ac4bf84bf7baa7de1eca328321ca3c Mon Sep 17 00:00:00 2001 From: Jeromy Date: Fri, 17 Jul 2015 17:28:44 -0700 Subject: [PATCH] mark other nodes in routing table on test-connect License: MIT Signed-off-by: Jeromy --- routing/dht/dht_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index 1358903a9..6baedfbd1 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -78,6 +78,14 @@ func connect(t *testing.T, ctx context.Context, a, b *IpfsDHT) { if err := a.host.Connect(ctx, pi); err != nil { t.Fatal(err) } + + for a.routingTable.Find(b.self) == "" { + time.Sleep(time.Millisecond * 5) + } + + for b.routingTable.Find(a.self) == "" { + time.Sleep(time.Millisecond * 5) + } } func bootstrap(t *testing.T, ctx context.Context, dhts []*IpfsDHT) {