Metrics.NET icon indicating copy to clipboard operation
Metrics.NET copied to clipboard

[.net40] Some tests hangs because of httpListener is waiting for request

Open jaasco opened this issue 8 years ago • 0 comments

Steps to reproduce:

  1. checkout net40 branch
  2. update nuget.exe to 4.1.0 $ cd .nuget $ nuget.exe update -self
  3. 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?

jaasco avatar May 23 '17 22:05 jaasco