Skip to content

test(e2e): fix flaky e2e tests (backport of #4443) - #4492

Merged
stevenvegt merged 1 commit into
V6.2from
V6_2/backport-4443-e2e-flakes
Sep 9, 2026
Merged

test(e2e): fix flaky e2e tests (backport of #4443)#4492
stevenvegt merged 1 commit into
V6.2from
V6_2/backport-4443-e2e-flakes

Conversation

@stevenvegt

Copy link
Copy Markdown
Member

Backport of #4443 to V6.2, cherry-picked without conflicts.

V6.2 still has the old assertJaegerTrace helper, which retries only while the trace is entirely absent and fails as soon as one node's spans are missing. Each node exports spans in batches on its own schedule, so a trace can be visible in Jaeger before every service has reported. That is the failure seen on #4489 (Trace missing service 'nodeA', found: nodeB). The same commit also fixes the gossip test timing that failed on an earlier run of #4487 (NodeD did not get 81 transactions within 10 seconds).

After this, e2e-tests/util.sh on V6.2 is identical to master.

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
(cherry picked from commit 4c123a6)
@qltysh

qltysh Bot commented Sep 9, 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.

@stevenvegt
stevenvegt merged commit 5506a44 into V6.2 Sep 9, 2026
8 of 9 checks passed
@stevenvegt
stevenvegt deleted the V6_2/backport-4443-e2e-flakes branch September 9, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants