clientv3/ordering: add missing 'errOrderViolation' error check

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

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-10-03 18:04:36 -07:00
parent 7fb5b90bed
commit b2f5393b64

View File

@ -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(