From f3e89e0f997f3003d395ef89548e201049c51fd5 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 25 Sep 2017 19:20:27 +0900 Subject: [PATCH] integration: match grpc.ErrClientConnClosing in proxy tests Signed-off-by: Gyu-Ho Lee --- integration/v3_grpc_inflight_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integration/v3_grpc_inflight_test.go b/integration/v3_grpc_inflight_test.go index dd0d180cc0d1..cc61509ab9c4 100644 --- a/integration/v3_grpc_inflight_test.go +++ b/integration/v3_grpc_inflight_test.go @@ -81,8 +81,9 @@ func TestV3KVInflightRangeRequests(t *testing.T) { defer wg.Done() _, err := kvc.Range(ctx, &pb.RangeRequest{Key: []byte("foo"), Serializable: true}, grpc.FailFast(false)) if err != nil { - if err != nil && rpctypes.ErrorDesc(err) != context.Canceled.Error() { - t.Fatalf("inflight request should be canceld with %v, got %v", context.Canceled, err) + e := rpctypes.ErrorDesc(err) + if e != context.Canceled.Error() && e != grpc.ErrClientConnClosing.Error() { + t.Fatalf("inflight request should be canceld with %v or %v, got %v", context.Canceled, grpc.ErrClientConnClosing, err) } } }()