Improve test coverage of SocketsHttpHandler (dotnet/corefx#27135)
authorStephen Toub <stoub@microsoft.com>
Fri, 16 Feb 2018 17:02:45 +0000 (12:02 -0500)
committerGitHub <noreply@github.com>
Fri, 16 Feb 2018 17:02:45 +0000 (12:02 -0500)
commitb6b2da9344adebf2bef3d72bf9983c9e297824c8
tree1f8c1b5b184dec0909b64f4c5572d9c19f05c4e9
parente9261079a4d15108a23cd353477a1d4957c6ecfe
Improve test coverage of SocketsHttpHandler (dotnet/corefx#27135)

* Improve test coverage of SocketsHttpHandler

Used code coverage information to write targeted tests to cover various uncovered paths in SocketsHttpHandler.  Along the way fixed a variety of issues relating to throwing the wrong exception type, a stack overflow due to an unexpected recursive call, etc.

* Address PR feedback

* Re-disable a test

Commit migrated from https://github.com/dotnet/corefx/commit/39677219aaeab8c6591b625ab2874acb17eaf4ef
31 files changed:
src/libraries/Common/src/System/Net/HttpStatusDescription.cs
src/libraries/Common/tests/System/Net/Configuration.Certificates.cs
src/libraries/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
src/libraries/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
src/libraries/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CrossProcess.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CrossProcess.cs
src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.RunAsClient.Unix.cs
src/libraries/System.Net.Http/src/System/Net/Http/ByteArrayHelpers.cs
src/libraries/System.Net.Http/src/System/Net/Http/Headers/HttpHeaderParser.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingWriteStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthWriteStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/DecompressionHandler.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/EmptyReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentDuplexStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentReadStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpContentWriteStream.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpProxyConnectionHandler.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpSystemProxy.cs
src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs
src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.ClientCertificates.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientTestBase.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
src/libraries/System.Threading/tests/SemaphoreTests.cs