-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
clientv3/integration: add TestBalancerUnderServerShutdownMutable* #8772
Conversation
|
||
timeout := time.Second | ||
failed := false | ||
for i := 0; i < 30; i++ { |
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.
why do we need 30 retries? we should expect exact one retry, right?
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.
I had 30 retries in case request never fails (try up to ~3-sec), or the error is transport is closing
which takes more than 100ms to recover(endpoint switch)--so it takes more than 1-retry to succeed.
Changed the logic to test with only one retry after failure, by giving more wait time.
253db0e
to
a690357
Compare
// shut down eps[0] | ||
clus.Members[0].Terminate(t) | ||
|
||
// switched to others when eps[0] was shut down |
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.
was explicitly shut down
lgtm |
/cc @jpbetz |
} | ||
|
||
// testBalancerUnderServerShutdownMutable expects when the member of the | ||
// pinned endpoint is shut down, balancer switch its endpoints and following |
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.
grammar nit: "...expects that when the member of the pinned endpoint is shut down, the balancer switches its endpoints and all subsequent..."
|
||
// switched to others when eps[0] was explicitly shut down | ||
// and following request should succeed | ||
time.Sleep(time.Second) |
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.
Potential source of test flakiness? Is there a condition we can poll for that would be more reliable?
Signed-off-by: Gyu-Ho Lee <[email protected]>
@jpbetz All fixed. And added |
lgtm Thanks! |
#8711