p2p/discover: fix flaky TestUDPv5_findnodeHandling

Set a very long PingInterval in the UDPv5 test harness to prevent the
table's revalidation loop from sending unexpected PING packets through
the test pipe. Under the race detector, the test runs slowly enough
for the default 3-second revalidation interval to fire, causing
background pings to appear as unmatched packets in the pipe queue
at close time.

Fixes #34108
This commit is contained in:
Charles Dusek 2026-03-27 14:27:49 -05:00
parent c3467dd8b5
commit 6668c1a2ee

View file

@ -937,6 +937,7 @@ func newUDPV5Test(t *testing.T) *udpV5Test {
PrivateKey: test.localkey,
Log: testlog.Logger(t, log.LvlTrace),
ValidSchemes: enode.ValidSchemesForTesting,
PingInterval: 1000 * time.Hour,
})
test.udp.codec = &testCodec{test: test, id: ln.ID()}
test.table = test.udp.tab