Skip to content

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

@jaasco

Description

@jaasco

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions