Stop blocking thread pool threads in VirtualNetwork-based tests (dotnet/corefx#35453)
authorStephen Toub <stoub@microsoft.com>
Wed, 20 Feb 2019 19:35:52 +0000 (14:35 -0500)
committerGitHub <noreply@github.com>
Wed, 20 Feb 2019 19:35:52 +0000 (14:35 -0500)
commit11097db47ffb00e4f91291f95f5c614ec7c69d50
tree9e45efbc7f3670c838b9ea48f520bf5cafe1356c
parent1546a5a5fe53fba9dcac2d029ab7267c29fcb30d
Stop blocking thread pool threads in VirtualNetwork-based tests (dotnet/corefx#35453)

The SslStream tests and others use an internal VirtualNetwork helper.  It's stream's ReadAsync method currently queues a work item to the thread pool that then blocks.  This results in spurious failures and timeouts as all of the threads in the pool get blocked under load.

Commit migrated from https://github.com/dotnet/corefx/commit/6b2628c69abaafda37dcd4fcb57e173a4f689e0c
src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetwork.cs
src/libraries/Common/tests/System/Net/VirtualNetwork/VirtualNetworkStream.cs
src/libraries/Common/tests/Tests/System/Net/VirtualNetworkTest.cs
src/libraries/System.Net.Security/tests/FunctionalTests/NotifyReadVirtualNetworkStream.cs