nuts-foundation / nuts-foundation/nuts-node

Flaky e2e test: gossip test times out waiting for 81 transactions

Open Beginner friendly
#4,321 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 waitForTXCount timeout for the gossip test (e.g. 10 → 30).
  • Make waitForTXCount poll 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.