mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 09:51:36 +00:00
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:
parent
c3467dd8b5
commit
6668c1a2ee
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue