-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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: finish isolated node test cases #8785
Conversation
func TestBalancerUnderNetworkPartitionSerializableGet(t *testing.T) { | ||
testBalancerUnderNetworkPartition(t, func(cli *clientv3.Client, ctx context.Context) error { | ||
_, err := cli.Get(ctx, "a", clientv3.WithSerializable()) | ||
if err == context.DeadlineExceeded { |
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.
for s-get, it should return immediately since it does not need go through raft. we should not even see deadline exceed, 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.
Removed and only kept s-get case that expects always succeeds on the first try.
}, 2*time.Second, false) | ||
} | ||
|
||
func TestBalancerUnderNetworkPartitionSerializableGetRetry(t *testing.T) { |
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.
what is the difference between Get and GetRetry?
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.
LinearizableGetWithRetry
expects quorum get succeeds on the second try, after network partition happens.
LinearizableGetWithNoRetry
expects quorum get blocks until balancer switch after network partition. Otherwise error out (without manual retry--expects first request succeeds).
1. one with retry 2. one without retry (range request with longer timeouts) Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
lgtm if tests pass. |
Codecov Report
@@ Coverage Diff @@
## master #8785 +/- ##
=========================================
Coverage ? 76.09%
=========================================
Files ? 360
Lines ? 29648
Branches ? 0
=========================================
Hits ? 22560
Misses ? 5516
Partials ? 1572 Continue to review full report at Codecov.
|
#8711