Skip to content

Commit

Permalink
log exception if Timeout_SetTenMillisecondsOnLoopback_ThrowsWebExcept…
Browse files Browse the repository at this point in the history
…ion test fails (#44509)

* log exception if Timeout_SetTenMillisecondsOnLoopback_ThrowsWebException test fails

* check exception type before checking time range
  • Loading branch information
wfurt committed Nov 11, 2020
1 parent 1625da3 commit 0f1d011
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,12 @@ public async Task Timeout_SetTenMillisecondsOnLoopback_ThrowsWebException()
WebException exception = Assert.Throws<WebException>(() => request.GetResponse());
sw.Stop();
Assert.InRange(sw.ElapsedMilliseconds, 1, 15 * 1000);
_output.WriteLine(exception.ToString());
Assert.Equal(WebExceptionStatus.Timeout, exception.Status);
Assert.Null(exception.InnerException);
Assert.Null(exception.Response);
Assert.InRange(sw.ElapsedMilliseconds, 1, 15 * 1000);
return Task.FromResult<object>(null);
});
Expand Down

0 comments on commit 0f1d011

Please sign in to comment.