Skip to content

Commit

Permalink
Remove bad deadline test (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK authored Aug 25, 2022
1 parent 1d7f988 commit 0551be8
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions test/Grpc.Net.Client.Tests/DeadlineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,36 +406,6 @@ public async Task AsyncServerStreamingCall_DeadlineDuringWrite_ResponseThrowsDea
Assert.AreEqual(StatusCode.DeadlineExceeded, call.GetStatus().StatusCode);
}

[Test]
public async Task AsyncUnaryCall_SuccessAndReadValuesAfterDeadline_ValuesReturned()
{
// Arrange
var httpClient = ClientTestHelpers.CreateTestClient(async request =>
{
var streamContent = await ClientTestHelpers.CreateResponseContent(new HelloReply()).DefaultTimeout();
return ResponseUtils.CreateResponse(HttpStatusCode.OK, streamContent);
});
var invoker = HttpClientCallInvokerFactory.Create(
httpClient,
systemClock: new TestSystemClock(new DateTime(2019, 11, 29, 1, 1, 1, DateTimeKind.Utc)));

// Act
var call = invoker.AsyncUnaryCall<HelloRequest, HelloReply>(ClientTestHelpers.ServiceMethod, string.Empty, new CallOptions(deadline: invoker.Channel.Clock.UtcNow.AddSeconds(0.5)), new HelloRequest());

// Assert
var result = await call.ResponseAsync.DefaultTimeout();
Assert.IsNotNull(result);

// Wait for deadline to trigger
await Task.Delay(1000);

Assert.IsNotNull(await call.ResponseHeadersAsync.DefaultTimeout());

Assert.IsNotNull(call.GetTrailers());

Assert.AreEqual(StatusCode.OK, call.GetStatus().StatusCode);
}

[Test]
public async Task AsyncUnaryCall_SetNonUtcDeadline_ThrowError()
{
Expand Down

0 comments on commit 0551be8

Please sign in to comment.