-
Notifications
You must be signed in to change notification settings - Fork 4.5k
xdsclient: add an e2e style test for fallback involving more than 2 servers #7817 #8427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
xdsclient: add an e2e style test for fallback involving more than 2 servers #7817 #8427
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8427 +/- ##
==========================================
+ Coverage 82.27% 82.29% +0.02%
==========================================
Files 414 414
Lines 40424 40436 +12
==========================================
+ Hits 33259 33277 +18
- Misses 5795 5798 +3
+ Partials 1370 1361 -9 🚀 New features to boost your workflow:
|
|
||
// Secondary2 fallback, RPCs reach backend3. | ||
secondary2Lis.Restart() | ||
if err := waitForRPCsToReachBackend(ctx, client, backend3.Address); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test to verify if connections are attempted to primary and secondary1 backends.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if conn, err := secondary2WrappedLis.NewConnCh.Receive(ctx); err == nil { | ||
cw := conn.(*testutils.ConnWrapper) | ||
if _, err := cw.CloseCh.Receive(ctx); err != nil { | ||
t.Fatalf("Failed to get connection to secondary2: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message is wrong. Here we are checking if connection to secondary2 is closed or not because we not have secondary1 running. Change the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
})) | ||
if conn, err := secondary1WrappedLis.NewConnCh.Receive(ctx); err == nil { | ||
cw := conn.(*testutils.ConnWrapper) | ||
cw.CloseCh.Receive(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we do not have a similar check here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out! I’ve updated the code.
Fixes: #7817
RELEASE NOTES: