Skip to content
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 blackhole tests for range RPCs #8790

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Oct 30, 2017

Fix #8711

@gyuho gyuho requested a review from xiang90 October 30, 2017 21:23
@gyuho gyuho changed the title clientv3/integration: add blachole tests for range RPCs clientv3/integration: add blackhole tests for range RPCs Oct 30, 2017
@xiang90
Copy link
Contributor

xiang90 commented Oct 30, 2017

newly added tests are failing.

@gyuho gyuho force-pushed the blackhole-immutable branch 2 times, most recently from 8cfee6e to ea73348 Compare October 31, 2017 00:41
func TestBalancerUnderBlackholeNoKeepAliveLinearizableGetShortTimeout(t *testing.T) {
testBalancerUnderBlackholeNoKeepAlive(t, func(cli *clientv3.Client, ctx context.Context) error {
_, err := cli.Get(ctx, "a")
if err == context.DeadlineExceeded {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct? l-get needs to go through raft, wont etcd return errtimeout when the leader is changing?

func TestBalancerUnderBlackholeNoKeepAliveLinearizableGetLongTimeout(t *testing.T) {
testBalancerUnderBlackholeNoKeepAlive(t, func(cli *clientv3.Client, ctx context.Context) error {
_, err := cli.Get(ctx, "a")
if err == context.DeadlineExceeded {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and what is the difference between the longtimeout and shorttimeout one for l-get?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, old one was wrong. We expect time-out errors on blackholed node, regardless of context timeout duration. Just removed it. Now only tests if it can switch out of blackholed endpoint after context timeout errors.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
@xiang90
Copy link
Contributor

xiang90 commented Oct 31, 2017

lgtm if test passes.

@gyuho gyuho merged commit 63d0ac0 into etcd-io:master Oct 31, 2017
@gyuho gyuho deleted the blackhole-immutable branch October 31, 2017 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants