p2p/discover: improve flaky revalidation tests (#30023)

This commit is contained in:
Halimao 2024-06-21 21:29:07 +08:00 committed by GitHub
parent c10ac4f48f
commit a71f6f91fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -135,7 +135,7 @@ func waitForRevalidationPing(t *testing.T, transport *pingRecorder, tab *Table,
simclock.Run(tab.cfg.PingInterval * slowRevalidationFactor) simclock.Run(tab.cfg.PingInterval * slowRevalidationFactor)
p := transport.waitPing(2 * time.Second) p := transport.waitPing(2 * time.Second)
if p == nil { if p == nil {
t.Fatal("Table did not send revalidation ping") continue
} }
if id == (enode.ID{}) || p.ID() == id { if id == (enode.ID{}) || p.ID() == id {
return p return p