Skip to content

Commit a7fd35f

Browse files
aschmahmannStebalien
authored andcommitted
test: fix TestFindPeerQuery and TestFindPeerQueryMinimal to not try and refresh routing tables for orphaned nodes
1 parent 7035c59 commit a7fd35f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dht_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,8 +1414,10 @@ func testFindPeerQuery(t *testing.T,
14141414
waitForWellFormedTables(t, dhts, minRTRefreshThreshold, minRTRefreshThreshold, 5*time.Second)
14151415

14161416
for _, d := range dhts {
1417-
if err := <-d.RefreshRoutingTable(); err != nil {
1418-
t.Fatal(err)
1417+
if len(d.RoutingTable().ListPeers()) > 0 {
1418+
if err := <-d.RefreshRoutingTable(); err != nil {
1419+
t.Fatal(err)
1420+
}
14191421
}
14201422
}
14211423

0 commit comments

Comments
 (0)