From b2f5393b6451621f37654953d2ebfdf899abff93 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Tue, 3 Oct 2017 18:04:36 -0700 Subject: [PATCH] clientv3/ordering: add missing 'errOrderViolation' error check Fix https://github.com/coreos/etcd/issues/8641. Signed-off-by: Gyu-Ho Lee --- clientv3/ordering/kv_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clientv3/ordering/kv_test.go b/clientv3/ordering/kv_test.go index 5cb9ddc67..79ce9491e 100644 --- a/clientv3/ordering/kv_test.go +++ b/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(