Clean up some tests and move to new Azure endpoint (dotnet/corefx#36018)
authorDavid Shulman <david.shulman@microsoft.com>
Thu, 14 Mar 2019 03:57:55 +0000 (20:57 -0700)
committerGitHub <noreply@github.com>
Thu, 14 Mar 2019 03:57:55 +0000 (20:57 -0700)
commitdd2c47fc442bb5cedeb217d4fe018a9f2521b4b1
treef0794c753fa5b0fc178789199d7fdcf2b19b7d05
parent440cb8cf44c4b38e548e0d7ae11a5bc49e447a4c
Clean up some tests and move to new Azure endpoint (dotnet/corefx#36018)

This PR changes the Azure test endpoint for HTTP/1.1 and WebSocket tests to use
Azure App Service instead of the classic Azure Cloud Service endpoint. This now
matches the HTTP/2.0 endpoint architecture.

We are deprecating the use of Azure Cloud Service endpoints because they are hard
to deploy and maintain. Azure App Service, on the other hand, provides a lot of benefits
including built in production/staging slots, TLS certificate handling and easier
integration with Azure DevOps deployment models.

There are a few downsides to Azure App Service which are known feature limitations.
Since it uses ARR (reverse proxy), it causes websocket connections to be proxied.
This results in some behavior changes for some edge condition tests we have. For example,
when a websocket handshake fails (due to subprotocol mismatch for example), the client
side doesn't see a TCP disconnect. Instead, due to the reverse proxy, we end up getting
an HTTP status code (like 500). Either way, it is a websocket handshake failure. So, I've
updated a few tests to be less brittle for that. I also opened another issue dotnet/corefx#36016 to
track moving a few websocket tests to the loopback websocket server which doesn't yet
have full capability.

I also converted an HTTP statusline test to use the loopback server.

Commit migrated from https://github.com/dotnet/corefx/commit/689e58ec123d8c730d48d1c35c8f7ecbba6c22cf
src/libraries/Common/tests/System/Net/Configuration.Http.cs
src/libraries/Common/tests/System/Net/Configuration.Security.cs
src/libraries/Common/tests/System/Net/Configuration.cs
src/libraries/Common/tests/System/Net/WebSockets/WebSocketCreateTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.cs
src/libraries/System.Net.Requests/tests/HttpWebRequestTest.cs
src/libraries/System.Net.WebClient/tests/WebClientTest.cs
src/libraries/System.Net.WebSockets.Client/tests/CloseTest.cs
src/libraries/System.Net.WebSockets.Client/tests/ConnectTest.cs