Files
dotnet-runtime/src/libraries/System.Net.Http
Stephen Toub e7fad1b9dc Fix hanging System.Net.Http test
We've been plagued for the last few weeks by CI jobs on Windows that hang in System.Net.Http.Functional.Tests, causing the whole job to fail after it eventually times out after two hours. I managed to find a CI server that had a process still alive after having experienced the hang and was able to debug it.  The Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses test is creating three loopback servers and using HttpClient.GetAsync to access each of them.  It's then Disposing of the HttpClient to verify that requests which should have been canceled are canceled.  The problem is that there's a race condition.  We may end up canceling one of the requests before it even gets a chance to connect to the server.  As a result, the server remains stuck in an asynchronous accept on it socket, and at the end of the test, we're waiting for all of the servers to shutdown... deadlock.  The fix is simple: don't wait for the servers... we don't care about their results, and they'll all be torn down when we exit the inner delegate.


Commit migrated from https://github.com/dotnet/corefx/commit/99b7b5a9b9f23e8b94bd8c75ecf86bb71d24b6c4
2016-06-10 11:29:49 -04:00
..
2016-06-10 11:29:49 -04:00
2016-03-10 16:15:19 -08:00