Commit Graph
13 Commits
Author SHA1 Message Date
Stephen Toub 7295751d20 Separate diagnostics tests into their own class
The only change to the logic is that the tests now use RemoteInvoke to run each test in its own process, so as to avoid EventSource and DiagnosticSource interference.

Also removed the xunit attributes from the assembly that prevented parallelization.  It's no longer needed as of this change.


Commit migrated from https://github.com/dotnet/corefx/commit/542d85e15bfe5fdeb59d7e6f7fb3b15a08640ebd
2016-06-20 14:13:10 -04:00
Stephen Toub 2424c43e44 Improve tracing in CurlHandler
While debugging some HttpClient issues, I needed more tracing in CurlHandler.  It's useful to check this in to help with future investigations.


Commit migrated from https://github.com/dotnet/corefx/commit/48da5807ac281c26b34ac375755a4d83b2268a91
2016-05-27 13:19:45 -04:00
stephentoub 5ffbace49b Fix HttpClient test hanging on single core
One of the HttpClient client tests hangs on a machine with a single core.
xunit by default uses a SynchronizationContext that has N threads to do
work, where N defaults to Environment.ProcessorCount.  Thus on a single
core machine, there's only one thread available to run tests, and if that
thread blocks waiting for an async operation that'll schedule work back to
that context, it'll deadlock.


Commit migrated from https://github.com/dotnet/corefx/commit/916798757c122b81e61666c4f0af0c446d378824
2016-05-11 15:05:14 -04:00
Eric Eilebrecht 13d2049dc6 Remove TODO comment
Timeouts like these aren't uncommon in the System.Net test code.


Commit migrated from https://github.com/dotnet/corefx/commit/fd2fa174bb59b768f63225fde5bdde31c97313e4
2016-04-20 10:05:35 -07:00
Eric Eilebrecht 3bd2cecc8d Replace TODO with more relevant TODO referencing dotnet/corefx#2383
This matches the similar comment elsewhere in this file.


Commit migrated from https://github.com/dotnet/corefx/commit/fb891c4df14a0224e4b8cedb99c68e26ed05c855
2016-04-20 10:05:34 -07:00
stephentoub 99e0ca33de Address PR feedback
Switch to avoid network requests when possible, and bring line coverage up to 100%.


Commit migrated from https://github.com/dotnet/corefx/commit/71e246929f5ae99bbba8611b7a5239a041b94f42
2016-03-30 08:18:40 -04:00
stephentoub a4d7a22225 Add more tests for HttpClient
To have more confidence while refactoring, added more HttpClient coverage, in particular of error paths.  Brings HttpClient line coverage from 64.7% to 98.3%, and branch coverage from 42.3% to 78.7%.


Commit migrated from https://github.com/dotnet/corefx/commit/2b88030aa1d2e7cb0b679e871fc4d0613ebbbf02
2016-03-29 19:34:21 -04:00
stephentoub b6b5cfd1c0 Fix HttpClient diagnostic listener issues
- Fix Assert that was throwing in a background thread due to mistmatched type (it was looking explicitly for HttpResponseMessage rather than any type in its inheritance hierarchy, and CurlHandler uses a derived type).
- Update project.json package versions
- Unsubscribe the listener when done with it


Commit migrated from https://github.com/dotnet/corefx/commit/9a8d97852bcce9be0b4b6b5eff5ed87f4e36119e
2016-02-16 18:13:49 -05:00
nbilling 4401926ae3 Http request/response DiagnosticSource logging.
- Added logging to WinHttpHandler, CurlHandler, and HttpHandlerToFilter
  for HTTP request/response.
- Added functional tests for HttpClient (WinHttpHandler is exercised by
  these tests on desktop).


Commit migrated from https://github.com/dotnet/corefx/commit/edbd7ba720699bbe20753872ac430f0b3fdaf3a9
2016-02-16 15:57:17 -05:00
Cristian Pop 01d61b736f Fixing and adding tests for the in-memory VirtualNetwork/Stream. Adding
TaskTimeoutExtensions and fixing the System.Net.Security timeout pattern.


Commit migrated from https://github.com/dotnet/corefx/commit/27954497d635ff0f01fbb16e1b485156c51398ea
2016-02-08 16:02:01 -08:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
David Shulman 9d997536f4 Port additional System.Net.Http tests to CoreFx
Added more http tests to open source from the original internal ToF tests. Some of
the tests should be refactored in the future to avoid Assert'ing multiple
logical things.

Fixed up test namespaces for System.Net.Http and
System.Net.Http.WinHttpHandler.


Commit migrated from https://github.com/dotnet/corefx/commit/e5a017cb6ca01e99b1f1462298bc0cbf60c06ee0
2015-09-21 11:48:34 -07:00
David Shulman 54525a2a94 Fix HttpClientHandler timeouts
Since HttpClientHandler doesn't expose all the timeout used by the
underlying WinHttpHandler, we need to disable those timeouts in favor of
the HttpClient.Timeout property.

Addresses issue dotnet/corefx#2857.


Commit migrated from https://github.com/dotnet/corefx/commit/86e89f73a1e7bf5b4fd40878f4fec4741a8651ca
2015-08-26 10:15:34 -07:00