Skip to content

test(e2e): fix flaky e2e tests - #4443

Open
stevenvegt wants to merge 1 commit into
masterfrom
fix-flaky-e2e-tests
Open

test(e2e): fix flaky e2e tests#4443
stevenvegt wants to merge 1 commit into
masterfrom
fix-flaky-e2e-tests

Conversation

@stevenvegt

Copy link
Copy Markdown
Member

What

Fixes two e2e flakes that recently failed CI on unrelated PRs (#4427, #4439).

Jaeger trace assertion (util.sh): assertJaegerTrace only retried while the trace was entirely absent from Jaeger. Each node exports spans in batches on its own schedule (5s default interval), so the first query after a flow can find a partial trace containing only one node's spans, which failed the assertion immediately (observed on #4427: FAILED: Trace '...' missing service 'nodeA' (found: nodeB), 30ms after the check started, while two earlier rfc021 variants passed the same check). Missing services or spans are now retried like a missing trace, up to 10 attempts with 1s sleeps, which comfortably covers the batch export interval. The success path is unchanged, and the final error message still reports what was missing on the last attempt.

Gossip propagation deadline (nuts-network/gossip/run-test.sh): the test waits for 81 transactions to propagate across 4 nodes but gave it only 10 seconds, the heaviest propagation assertion in the suite on the same budget as tests waiting for at most 41 transactions. Slow CI runners regularly miss that deadline (observed on #4439). The deadline is now 30 seconds; waitForTXCount polls every second, so passing runs are not slowed down.

To be backported to release branches later, since PR CI on those branches runs the e2e-tests/ directory from their own merge ref.

assertJaegerTrace only retried while the trace was entirely absent
from Jaeger. Each node exports spans in batches on its own schedule
(5s default), so the first query after a flow often finds a partial
trace containing only one node's spans, which failed the assertion
immediately. Missing services or spans are now retried like a missing
trace, up to 10 attempts with 1s sleeps.

The gossip test gave propagation of 81 transactions across 4 nodes
only 10 seconds, the heaviest propagation assertion in the suite on
the same budget as tests waiting for at most 41 transactions. Slow CI
runners regularly miss that deadline; it is now 30 seconds.

Both were observed as e2e failures on unrelated PRs (#4427, #4439).

Assisted-by: AI
@qltysh

qltysh Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant