Skip to content

Commit

Permalink
integration: match code.Canceled in "TestV3KVInflightRangeRequests"
Browse files Browse the repository at this point in the history
Match new error codes in gRPC v1.22.0

Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Jul 25, 2019
1 parent 93ca57e commit 2e3d59b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration/v3_grpc_inflight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}()
Expand Down

0 comments on commit 2e3d59b

Please sign in to comment.