etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jaasco opened this issue · 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?