Skip to content

Commit

Permalink
Fix the failure in TestEndpointSwitchResolvesViolation
Browse files Browse the repository at this point in the history
Refer to a0bdfc4

Signed-off-by: Benjamin Wang <wachao@vmware.com>
  • Loading branch information
ahrtr committed Aug 5, 2022
1 parent 18a87dd commit e0c1109
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/clientv3/ordering_util_test.go
Expand Up @@ -62,6 +62,7 @@ func TestEndpointSwitchResolvesViolation(t *testing.T) {
}

cli.SetEndpoints(eps...)
time.Sleep(1 * time.Second) // give enough time for the operation
orderingKv := ordering.NewKV(cli.KV, ordering.NewOrderViolationSwitchEndpointClosure(cli))
// set prevRev to the second member's revision of "foo" such that
// the revision is higher than the third member's revision of "foo"
Expand All @@ -72,9 +73,11 @@ func TestEndpointSwitchResolvesViolation(t *testing.T) {

t.Logf("Reconfigure client to speak only to the 'partitioned' member")
cli.SetEndpoints(clus.Members[2].GRPCURL())
time.Sleep(1 * time.Second) // give enough time for the operation
t.Log("Getting data from the partitioned member...")
_, err = orderingKv.Get(ctx, "foo", clientv3.WithSerializable())
if err != ordering.ErrNoGreaterRev {
t.Fatal("While speaking to partitioned leader, we should get ErrNoGreaterRev error")
t.Fatalf("While speaking to partitioned leader, we should get ErrNoGreaterRev error, %v", err)
}
}

Expand Down

0 comments on commit e0c1109

Please sign in to comment.