Skip to content

Commit

Permalink
integration: match grpc.ErrClientConnClosing in proxy tests
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Sep 25, 2017
1 parent 09a43e5 commit 362768f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration/v3_grpc_inflight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}()
Expand Down

0 comments on commit 362768f

Please sign in to comment.