[.net40] Some tests hangs because of httpListener is waiting for request
jaasco opened this issue · 0 comments
jaasco commented
Steps to reproduce:
- checkout net40 branch
- update nuget.exe to 4.1.0
$ cd .nuget
$ nuget.exe update -self - run build.net40.bat
Expected results:
All test would be passed.
Actual results:
xunit.console.clr4.exe hangs when about 17-21 are passed.
In a Visual Studio I found that it hangs on several tests like:
NoErrorIsLoggedWhenHttpEndpointIsDisposed
HttpEndpointDoesNotThrowOnDispose
SecondCallToWithHttpEndportDoesNotThrow
HttpEndportLogsAnErrorIfPortIsOccupied
HttpEndpointDoesNotThrowIfPortIsOccupied
when after httpListener.GetContext() it starts to wait for request in a void ProcessRequests() thread in MetricsHttpListener class. When I send some GET request to appropriate URL the thread goes forward and the test passing well.
How should I pass all tests without sending the http requests by myself?