nuts-foundation / nuts-foundation/nuts-node
Flaky e2e test: gossip test times out waiting for 81 transactions
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
Summary
The nuts-network/gossip e2e test intermittently fails on CI with:
Performing assertions...
Waiting for service 'NodeA' to contain 81 transactions..........FAILED: Service 'NodeA' did not get 81 transaction within 10 seconds
Observed on an unrelated PR (#4302, a vcr/verifier nil-pointer fix); the test passed on re-run, confirming it is flaky rather than a regression.
Example failed run: https://github.com/nuts-foundation/nuts-node/actions/runs/26814933661/job/79054197457
Cause
e2e-tests/nuts-network/gossip/run-test.sh creates 81 transactions across 4 nodes (1 root + 20 DIDs × 4 nodes), then asserts every node has gossiped all 81 within a fixed window:
waitForTXCount "NodeA" "http://localhost:18081/status/diagnostics" 81 10
waitForTXCount "NodeD" "http://localhost:48081/status/diagnostics" 81 10
waitForTXCount (e2e-tests/util.sh) polls transaction_count once per second for at most TIMEOUT (10) iterations. Under CI load, gossip propagation of all 81 transactions can take longer than 10 seconds, so the assertion times out even though the network would eventually converge.
Impact
Spurious red CI on unrelated PRs; requires a manual re-run to go green.
Possible fixes
- Increase the
waitForTXCounttimeout for the gossip test (e.g. 10 → 30). - Make
waitForTXCountpoll more frequently with a wall-clock deadline instead of a fixed iteration count.
Assisted by AI
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with e2e-tests/nuts-network/gossip/run-test.sh and the waitForTXCount implementation in e2e-tests/util.sh. Run the gossip e2e test and inspect how transaction_count is polled under CI-like timing. Done means the test reliably waits for all 81 transactions without spurious timeout failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100