test: fix flaky RouteStatNameTest and refactor#8368
Merged
arkodg merged 5 commits intoenvoyproxy:mainfrom Mar 7, 2026
Merged
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
@zhaohuabing Ptal, thanks :) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8368 +/- ##
==========================================
- Coverage 74.23% 74.20% -0.04%
==========================================
Files 242 242
Lines 37335 37335
==========================================
- Hits 27717 27703 -14
- Misses 7685 7696 +11
- Partials 1933 1936 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
again flaky #7484 ? |
Member
|
@Arpit529Srivastava can you adpot #8350 into your PR? |
Contributor
Author
made the requested changes please take a look, thanks :) |
Contributor
Author
|
/cc @zirain |
Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
03f592e to
d808257
Compare
Member
|
wait #8370 |
Member
Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
2fbb7ae to
e3e5d5a
Compare
Contributor
Author
zhaohuabing
approved these changes
Mar 6, 2026
Member
zhaohuabing
left a comment
There was a problem hiding this comment.
LGTM — thanks for helping fix the flake!
Member
|
/retest |
zirain
approved these changes
Mar 6, 2026
Contributor
Author
|
@zhaohuabing @zirain ig we are good to merge? |
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.
What type of PR is this?
fix flaky e2e tests
What this PR does / why we need it:
httproutestatnametest/prometheusandtcproutestatnametest/prometheuswere flaky because they sent traffic immediately after the gateway and route were accepted, without waiting for thebackendtrafficpolicy(which configuresroutestatname) to be accepted and propagated to envoy via xds.this introduced a race condition where traffic could reach envoy before the custom stat name was configured, so the expected prometheus metric label was never emitted and the 1-minute poll failed with
context deadline exceeded.the fix adds a
backendtrafficpolicymustbeacceptedcheck in both tests before sending traffic, ensuring the policy is fully reconciled and pushed to envoy first. this follows the same pattern already used by other tests in this package.this pr also adopts the refactoring from #8350 by merging both tests into a single
routestatnametestwitht.run("httproute")andt.run("tcproute")subtests.Which issue(s) this PR fixes:
Fixes #8110
Release Notes: Yes/No
No