The test fails sometimes on macOS CI with:
v5_udp_test.go:477: unexpected error: "RPC timeout"
Fixing by increasing the timeout from 120ms to 700ms,
and move the test to the integration suite, because it takes up to 1s now.
* added check method to hd
* goroutine to check if we have headers
* added initial cycle to Ethereum object
* stage loop will only run ones
* got rid of anchor print
* header stage skip cycle message
* increased original time by a 2 seconds
* for inside of stageloop
* simplified
* little fixes
* got rid of skipCycle
* simplified
* hmm
* Restore skip analysis optimisation
* Make checkChangeSets work with snapshots
* Add syncmode to checkChangeSets
* Add block number for BSC
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* TestTable_ReadRandomNodesGetAll: refactor to integration and examples
* TestTable_bumpNoDuplicates: refactor to integration and examples
* TestUDPv4_smallNetConvergence: speed up from 1.7s to 0.3s by applying the test config
* TestUPNP_DDWRT: move to integration tests
* TestFairMix: split in 2, do more iterations in integration tests
* TestDialSched: speed up from 1s to 0.2s by removing the unexpected dial check,
(keep the check during the integration tests)
* 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
Reasons:
* duktape is not maintained
* on macOS it produces a warning: unused function '_duk_debugger_attach'
(this slows down incremental builds and pollutes the test logs)
Why goja?
Geth has migrated some parts to goja (console and clef signer tool),
although not migrated tracers yet.
* fix isPrecompiled() native function
* recursion limit test is obsolete
* list "all" targets explicitly
* add missing targets
* add missing build flags
* add test-integration target
* show tests output
* use wmake test on CI
* update submodules for all targets (like Makefile)
* remove unused function Test-Administrator
The test is flaky when the reply timeout is too low.
Increasing the timeout makes it slow.
Move the test to the integration suite.
Having a higher timeout is fine there.