diff --git a/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcClientStreaming.cs b/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcClientStreaming.cs index e92e16b6..f6e54ce5 100644 --- a/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcClientStreaming.cs +++ b/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcClientStreaming.cs @@ -124,7 +124,7 @@ public async Task CallWithDeadline() { var response = await call.ResponseAsync; }); - Assert.Equal(StatusCode.DeadlineExceeded, ex.StatusCode); + Assert.True(ex.StatusCode == StatusCode.DeadlineExceeded || ex.StatusCode == StatusCode.Cancelled, "Expected StatusCode to be DeadlineExceeded or Cancelled."); Assert.True(service.CancellationTokenRaisedException, "Expected server to see cancellation."); } diff --git a/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcUnary.cs b/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcUnary.cs index 6e7d427d..f2684c71 100644 --- a/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcUnary.cs +++ b/UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcUnary.cs @@ -102,7 +102,7 @@ public async Task CallWithDeadline() { var response = await client.UnaryAsync(new Request { Value = 1, DelayMilliseconds = _timeoutThresholdAfterDeadlineSeconds * 1000 }, deadline: deadline); }); - Assert.Equal(StatusCode.DeadlineExceeded, ex.StatusCode); + Assert.True(ex.StatusCode == StatusCode.DeadlineExceeded || ex.StatusCode == StatusCode.Cancelled, "Expected StatusCode to be DeadlineExceeded or Cancelled."); Assert.True(service.CancellationTokenRaisedException, "Expected server to see cancellation."); }