Browse Source

clientv3/ordering: add missing 'errOrderViolation' error check

Fix https://github.com/coreos/etcd/issues/8641.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
Gyu-Ho Lee 8 years ago
parent
commit
b2f5393b64
1 changed files with 2 additions and 2 deletions
  1. 2 2
      clientv3/ordering/kv_test.go

+ 2 - 2
clientv3/ordering/kv_test.go

@@ -149,8 +149,8 @@ func TestDetectTxnOrderViolation(t *testing.T) {
 	cli.SetEndpoints(clus.Members[2].GRPCAddr())
 
 	_, err = orderingKv.Get(ctx, "foo", clientv3.WithSerializable())
-	if err != nil {
-		t.Fatal(err)
+	if err != errOrderViolation {
+		t.Fatalf("expected %v, got %v", errOrderViolation, err)
 	}
 	orderingTxn = orderingKv.Txn(ctx)
 	_, err = orderingTxn.If(