The gated e2e suites run serial (-parallel 1), so every hardcoded time.Sleep adds directly to wall-clock. ~99s of literal second-sleeps across the gated tests (more in ms/const), and these fixed waits are also a flakiness source.
Fix: replace "sleep N then assert" with poll-until-condition (timeout N). Cuts serial wall-clock and de-flakes.
Files (gated: test/e2e/daemon/ready + test/sequentialtest):
Out of scope: test/e2e/daemon/wip/* sleeps (kafka_tls ~44s, unmined_tx_cleanup ~22s, invalid_block ~20s) — wip/ is not run by the smoke gate (smoke runs the ready/ package). Verify wip/ isn't run by a nightly before touching.
Related: #997 — the FSM-readiness ceiling in test/nodeHelpers/blockchainDaemon.go. Fixing it lets several of these sleeps be deleted outright rather than converted.
The gated e2e suites run serial (
-parallel 1), so every hardcodedtime.Sleepadds directly to wall-clock. ~99s of literal second-sleeps across the gated tests (more in ms/const), and these fixed waits are also a flakiness source.Fix: replace "sleep N then assert" with poll-until-condition (timeout N). Cuts serial wall-clock and de-flakes.
Files (gated:
test/e2e/daemon/ready+test/sequentialtest):test/e2e/daemon/ready/banlist_e2e_test.go— 8×5s@ lines 48, 83, 180, 286, 357, 453, 509, 557 (~40s, biggest single offender)test/e2e/daemon/ready/utxo_test.go:286—10stest/e2e/daemon/ready/multi_node_send_2_tx_test.go:58—10stest/e2e/daemon/ready/reorg_test.go— ~9s (incl:333)test/e2e/daemon/ready/smoke_test.go— ~8s (5 sleeps, incl:2097)test/e2e/daemon/ready/pruner_parent_before_child_test.go:204—5stest/sequentialtest/block_assembly/block_assembly_restart_test.go— ~6s (3 sleeps)test/e2e/daemon/ready/legacy_sync_test.go— ~4.8s (7 small)test/e2e/daemon/ready/block_persister_test.go— ~4sOut of scope:
test/e2e/daemon/wip/*sleeps (kafka_tls ~44s, unmined_tx_cleanup ~22s, invalid_block ~20s) —wip/is not run by the smoke gate (smoke runs theready/package). Verifywip/isn't run by a nightly before touching.Related: #997 — the FSM-readiness ceiling in
test/nodeHelpers/blockchainDaemon.go. Fixing it lets several of these sleeps be deleted outright rather than converted.