Improve WebClient upload tests stability (dotnet/corefx#36828)
authorDavid Shulman <david.shulman@microsoft.com>
Sat, 13 Apr 2019 00:27:40 +0000 (17:27 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Apr 2019 00:27:40 +0000 (17:27 -0700)
commitb65543fb17d7e0c87975ac1086717206d9b72f83
tree0bb4a57fd6c871e165a05e685afe4e3acc3a5da1
parent8f6e3a1ca40a8f0702733b346f5b9a951abd3340
Improve WebClient upload tests stability (dotnet/corefx#36828)

This PR is a follow-up to PR dotnet/corefx#36801 which improved HttpClient tests stability.

Some of the WebClient tests were failing with WebExceptions being caused by the
Azure remote endpoint returning 500 status code. Similar to the fixes done to
the HttpClient tests, this PR updates some of the WebClient upload tests to use
the VerifyUpload endpoint which doesn't have to echo back the request body payload.

Some of the WebClient tests upload more complex multi-part formats and can't be
easily changed to use the VerifyUpload endpoint. But those tests aren't using large
data sets so it should be ok.

Closes dotnet/corefx#36226

Commit migrated from https://github.com/dotnet/corefx/commit/00e9390eb0e9b95a410bd3e91b2c58cf9ec85d95
src/libraries/System.Net.WebClient/tests/WebClientTest.cs