Skip to content

Commit

Permalink
Timeout increased to 10 miliseconds (dotnet#35289)
Browse files Browse the repository at this point in the history
Timeout increased to 10 milliseconds in Timeout_TooShort_AllPendingOperationsCanceled

Fixes dotnet#32818
  • Loading branch information
alnikola committed Apr 23, 2020
1 parent a235a5a commit d449e51
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public void Timeout_TooShort_AllPendingOperationsCanceled(HttpCompletionOption c
{
using (var client = new HttpClient(new CustomResponseHandler((r, c) => WhenCanceled<HttpResponseMessage>(c))))
{
client.Timeout = TimeSpan.FromMilliseconds(1);
client.Timeout = TimeSpan.FromMilliseconds(10);
Task<HttpResponseMessage>[] tasks = Enumerable.Range(0, 3).Select(_ => client.GetAsync(CreateFakeUri(), completionOption)).ToArray();
Assert.All(tasks, task => {
OperationCanceledException e = Assert.ThrowsAny<OperationCanceledException>(() => task.GetAwaiter().GetResult());
Expand Down

0 comments on commit d449e51

Please sign in to comment.