erigon-pulse/p2p/discover
battlmonstr 91076141b1
p2p (#4119): treat slow discover v5 tests (#4122)
* configure a 50 ms timeout for tests (like v4 tests)
* use in-memory DB (like v4 tests)
* TestUDPv5_callTimeoutReset: improve speed from 1.2s to 0.2s
* TestUDPv5_callTimeoutReset: reduce the likelihood of "RPC timeout"
* move lookup tests to the "integration" suite
* log details of unmatched packets and sends to non-existing nodes
* fix flaky TestUDPv5_findnodeHandling:

    Table.nextRevalidateTime was random (from 0 to 10s).
    Sometimes it triggered doRevalidate immediately, and it produced an unexpected ping.
    Configure a high interval to not revalidate during the tests.

Time improved from 1.7s to 0.2s.

Test with:

    go test ./p2p/discover -run TestUDPv5 -count 1
2022-05-12 10:24:51 +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 (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
lookup_util_test.go up linter version (#4108) 2022-05-10 10:14:09 +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_integration_test.go p2p: improve test TestTable_findnodeByID (#4047) 2022-05-03 08:32:54 +01:00
table_test.go p2p: improve test TestTable_findnodeByID (#4047) 2022-05-03 08:32:54 +01:00
table_util_test.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
table.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
v4_lookup_test.go p2p: move v4_lookup_test to integration tests (#4107) 2022-05-10 08:49:17 +07:00
v4_udp_test.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
v4_udp.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
v5_lookup_test.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
v5_udp_test.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00
v5_udp.go p2p (#4119): treat slow discover v5 tests (#4122) 2022-05-12 10:24:51 +07:00