From 010e6d70e925b254d9772b5f7960e45a1b0d5e6d Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Tue, 23 Jul 2019 08:36:54 -0700 Subject: [PATCH] integration: match code.Canceled in "TestV3KVInflightRangeRequests" Match new error codes in gRPC v1.22.0 Signed-off-by: Gyuho Lee --- integration/v3_grpc_inflight_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/v3_grpc_inflight_test.go b/integration/v3_grpc_inflight_test.go index c89bc2c4acc1..6fd95a661753 100644 --- a/integration/v3_grpc_inflight_test.go +++ b/integration/v3_grpc_inflight_test.go @@ -85,8 +85,8 @@ func TestV3KVInflightRangeRequests(t *testing.T) { if err != nil { errCode := status.Convert(err).Code() errDesc := rpctypes.ErrorDesc(err) - if err != nil && !(errDesc == context.Canceled.Error() || errCode == codes.Unavailable) { - t.Errorf("inflight request should be canceled with '%v' or code Unavailable, got '%v' with code '%s'", context.Canceled.Error(), errDesc, errCode) + if err != nil && !(errDesc == context.Canceled.Error() || errCode == codes.Canceled || errCode == codes.Unavailable) { + t.Errorf("inflight request should be canceled with '%v' or code Canceled or Unavailable, got '%v' with code '%s'", context.Canceled.Error(), errDesc, errCode) } } }()