Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Feb 9, 2021
1 parent e6fde43 commit 200ee48
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions test/FunctionalTests/Client/RetryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,32 +228,5 @@ Task<DataMessage> UnaryFailure(DataMessage request, ServerCallContext context)

tcs.SetResult(new DataMessage());
}

//[Test]
//public async Task Unary_DeadlineExceed_Failure()
//{
// // Arrange

// var callCount = 0;
// var httpClient = ClientTestHelpers.CreateTestClient(async request =>
// {
// callCount++;
// await request.Content!.CopyToAsync(new MemoryStream());
// return await tcs.Task;
// });
// var serviceConfig = CreateServiceConfig(retryableStatusCodes: new List<StatusCode> { StatusCode.DeadlineExceeded });
// var invoker = HttpClientCallInvokerFactory.Create(httpClient, serviceConfig: serviceConfig);

// // Act
// var call = invoker.AsyncUnaryCall<HelloRequest, HelloReply>(ClientTestHelpers.ServiceMethod, string.Empty, new CallOptions(deadline: DateTime.UtcNow.AddMilliseconds(50)), new HelloRequest { Name = "World" });

// // Assert
// Assert.GreaterOrEqual(1, callCount);
// var ex = await ExceptionAssert.ThrowsAsync<RpcException>(() => call.ResponseAsync).DefaultTimeout();
// Assert.AreEqual(StatusCode.DeadlineExceeded, ex.StatusCode);
// Assert.AreEqual(StatusCode.DeadlineExceeded, call.GetStatus().StatusCode);

// tcs.SetException(new OperationCanceledException());
//}
}
}

0 comments on commit 200ee48

Please sign in to comment.