Skip to content

Commit

Permalink
Fix gRPC test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
hach-que committed Jan 15, 2025
1 parent 996679c commit cc759da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down
2 changes: 1 addition & 1 deletion UET/Redpoint.GrpcPipes.Transport.Tcp.Tests/TcpGrpcUnary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down

0 comments on commit cc759da

Please sign in to comment.