From 8a2a951d793a1d1a0673f88c9f18a325a9a71ab3 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 c89bc2c4a..6fd95a661 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) } } }()