test(e2e): fix flaky e2e tests (backport of #4443) - #4492
Merged
Conversation
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)
stevenvegt
requested review from
gerardsn,
reinkrul and
woutslakhorst
as code owners
September 9, 2026 08:23
reinkrul
approved these changes
Sep 9, 2026
Contributor
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.