Skip to content

Commit 4b85a1c

Browse files
committed
refresh twice
1 parent bcb2f2c commit 4b85a1c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

dht_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,10 @@ func testFindPeerQuery(t *testing.T,
16541654
for i := 0; i < bootstrappers; i++ {
16551655
connectNoSync(t, ctx, guy, others[i])
16561656
}
1657+
/*
1658+
guy => bootstrappers
1659+
peers => bootstrappers
1660+
*/
16571661

16581662
t.Log("waiting for routing tables")
16591663

@@ -1668,6 +1672,7 @@ func testFindPeerQuery(t *testing.T,
16681672
go func(d *IpfsDHT) {
16691673
<-d.RefreshRoutingTable()
16701674
wg.Done()
1675+
<-d.RefreshRoutingTable()
16711676
}(dht)
16721677
}
16731678

@@ -1697,7 +1702,7 @@ func testFindPeerQuery(t *testing.T,
16971702
t.Logf("got %d peers", len(outpeers))
16981703
got := kb.SortClosestPeers(outpeers, rtval)
16991704

1700-
assert.EqualValues(t, exp, got)
1705+
assert.EqualValues(t, exp, got, "%s\n%s", exp, got)
17011706
}
17021707

17031708
func TestFindClosestPeers(t *testing.T) {

go-libp2p-kad-dht.test

40.7 MB
Binary file not shown.

0 commit comments

Comments
 (0)