Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vinothkumarr227
Copy link
Contributor

Fixes: #7817

RELEASE NOTES:

Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.29%. Comparing base (dd718e4) to head (ba3330f).
Report is 16 commits behind head on master.

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     

see 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


// Secondary2 fallback, RPCs reach backend3.
secondary2Lis.Restart()
if err := waitForRPCsToReachBackend(ctx, client, backend3.Address); err != nil {
Copy link
Member

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.

Copy link
Contributor Author

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)
Copy link
Member

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.

Copy link
Contributor Author

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)
Copy link
Member

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?

Copy link
Contributor Author

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.

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.

xdsclient: add an e2e style test for fallback involving more than 2 servers
2 participants