mark other nodes in routing table on test-connect
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
Jeromy committed
Jul 17, 2015 at 17:28 UTC
4780c65171ac4bf84bf7baa7de1eca328321ca3c
1 file changed
+8
routing/dht/dht_test.go
+8
@@ -78,6 +78,14 @@ func connect(t *testing.T, ctx context.Context, a, b *IpfsDHT) {
78
if err := a.host.Connect(ctx, pi); err != nil {
79
t.Fatal(err)
80
}
81
+
82
+ for a.routingTable.Find(b.self) == "" {
83
+ time.Sleep(time.Millisecond * 5)
84
+ }
85
+
86
+ for b.routingTable.Find(a.self) == "" {
87
+ time.Sleep(time.Millisecond * 5)
88
+ }
89
}
90
91
func bootstrap(t *testing.T, ctx context.Context, dhts []*IpfsDHT) {