p2p/discover: really fix tests

This commit is contained in:
Felix Lange 2019-01-29 16:36:56 +01:00
parent d8fe86c6b9
commit 28466e4cf2

View file

@ -286,8 +286,13 @@ func TestUDP_findnode(t *testing.T) {
}
})
}
waitNeighbors(expected.entries[:maxNeighbors])
waitNeighbors(expected.entries[maxNeighbors:])
// Receive replies.
want := expected.entries
if len(want) > maxNeighbors {
waitNeighbors(want[:maxNeighbors])
want = want[maxNeighbors:]
}
waitNeighbors(want)
}
func TestUDP_findnodeMultiReply(t *testing.T) {