erigon-pulse/p2p/discover
battlmonstr 17fb707f80
p2p: fix flaky TestUDPv5_lookupE2E (#4020)
The test was flaky, because of the "endpoint prediction".
The test starts 5 nodes one by one.
Node 0 is used as a bootstrap node for nodes 1-4.
When it is about to add, say, node 3, nodes 0 and 1 might already have had a chance to communicate,
and updateEndpoints() deletes the node 0 UDP port, because fallbackUDP port was not configured.

In this case node 3 would get a bootstrap node 0 without a port and lead to an error:

    v5_udp_test.go:110: bad bootstrap node "enr:...": missing UDP port

The problem was reproducible by this command:

    go test ./p2p/discover -run TestUDPv5_lookupE2E -count 500
2022-04-29 01:19:47 +07:00
..
v4wire p2p/discover/v4wire: use optional RLP field for EIP-868 seq (#3963) 2022-04-26 15:37:00 +01:00
v5wire Replace ioutil with io and os (#3946) 2022-04-23 15:43:00 +01:00
common.go p2p: speed-up TestUDPv4_LookupIterator (#4000) 2022-04-28 09:18:42 +07:00
lookup.go Discovery: speed up lookup tests (#3677) 2022-03-11 12:04:42 +07:00
node.go Discovery: refactor public key to node ID conversions. (#3634) 2022-03-03 21:58:31 +07:00
ntp.go Clean up DEBUG category logs (#2776) 2021-10-05 08:14:04 +07:00
table_test.go less qcheck iterations (#3622) 2022-02-25 13:47:48 +07:00
table_util_test.go Discovery: refactor public key to node ID conversions. (#3634) 2022-03-03 21:58:31 +07:00
table.go Discovery: split node records to a sepatate DB table (#3581) (#3667) 2022-03-10 14:57:25 +01:00
v4_lookup_test.go p2p: speed-up TestUDPv4_LookupIterator (#4000) 2022-04-28 09:18:42 +07:00
v4_udp_test.go p2p: speed-up TestUDPv4_LookupIterator (#4000) 2022-04-28 09:18:42 +07:00
v4_udp.go p2p: speed-up TestUDPv4_LookupIterator (#4000) 2022-04-28 09:18:42 +07:00
v5_udp_test.go p2p: fix flaky TestUDPv5_lookupE2E (#4020) 2022-04-29 01:19:47 +07:00
v5_udp.go Discovery: add Context to Listen. (#3577) 2022-02-22 18:18:43 +00:00