Commit Graph
245 Commits
Author SHA1 Message Date
stephentoub 120b636957 Correctly annotate a stress test with HttpStressEnabled
It's failed a few times in outerloop; we only want it enabled when we're doing a stress test and nothing else is running, as the time it takes can fluctuate if lots of other things are running.


Commit migrated from https://github.com/dotnet/corefx/commit/d80099c00a3f55acc83089d32794e700171c3030
2016-04-30 06:53:02 -04:00
David Shulman 366f1290d2 Clean up ResponseStreamTest
Used the MD5 hash verification when verifying correct response body
dowload.

Fixes dotnet/corefx#7885.


Commit migrated from https://github.com/dotnet/corefx/commit/b9859e8b30b781e59e050874f8c9ef096cdcac0c
2016-04-29 10:29:59 -07:00
David Shulman 4c9d153e59 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/1eb395b5a05d6728411b0958a2c9df8b36c39fd5
2016-04-28 16:03:53 -07:00
David Shulman cbb2fa09d4 Fix HttpRequestMessage.Version tests
The current tests validating HTTP request message version were depending on a server behavior that is not guaranteed. In particular, HTTP RFC 7230 states that servers are NOT required to respond back with the same minor version if they support a higher minor version. In fact, the RFC states that servers SHOULD send back the highest minor version they support. So, testing the response version to see if the client sent a particular request version only works for some servers. In particular the 'Http2Servers' used in these tests seemed to echo the minor version of the request.

However, depending on network configuration, intermediate proxies can change the HTTP version that ends up getting sent to the destination server. And as a result, we can have unpredictable behavior in these tests.

To fix this, the tests were switched to use a loopback server that has deterministic behavior.


Commit migrated from https://github.com/dotnet/corefx/commit/d1ffcbcc120d3797dadce6196f499a0631e47caf
2016-04-28 10:57:12 -07:00
stephentoub 6e8cc68acf Consolidate loopback server code to LoopbackServer.cs
Also add Date header to responses


Commit migrated from https://github.com/dotnet/corefx/commit/f4804b5f54a9fe60b0dad794936c7b73b47be19f
2016-04-28 08:42:36 -04:00
stephentoub a2977e9fad More HttpClient test fixes and additions
- The GetAsync_ResponseWithSetCookieHeaders_AllCookiesRead test has been failing with some regularity in CI, with strange GatewayTimeout errors.  I don't know why this particular test is so much more susceptible to that, but I've changed the test to use a local loopback server rather than an external site.

- The SendAsync_ReadFromSlowStreamingServer_PartialDataReturned test was relying on timings from the server that might not always be correct, and due to internal differences between curl and WinHttp were very frequently wrong on Unix such that the test was disabled there.  I reimplemented it with a local loopback server, too.

- I've added another mini-stress test, with posts instead of gets.


Commit migrated from https://github.com/dotnet/corefx/commit/9b6a0224c3e404afe3f2c58dfb59e2068391c879
2016-04-27 13:44:35 -04:00
Stephen Toub bd529e5af9 Merge pull request dotnet/corefx#8082 from stephentoub/curlhandler_finalization
Enable finalization of resources in CurlHandler

Commit migrated from https://github.com/dotnet/corefx/commit/f55dbdb64d28ab231401b906c7bb6f411b045d4e
2016-04-26 21:36:15 -04:00
Eric St. John b1119fb4ef Cleanup usage of Linux/OSX
We've standardized on using Unix in most cases where we only cross-
compile once for Unix.  This change cleans up mentions of Linux/OSX when
we aren't actually cross-compiling for those OSes.

The remaining projects that still cross-compile for Linux/OSX are:
  System.Diagnostics.Process
  System.IO.FileSystem.Watcher
  System.Net.NetworkInformation

The System.Net.Security functional tests seem to still have a distinct
difference in functional behavior on OSX so I have also left these
configured to cross-compile for Linux/OSX.


Commit migrated from https://github.com/dotnet/corefx/commit/16ee317fa4e194ff7cf61e923caf103909e391f1
2016-04-26 14:37:21 -07:00
stephentoub b12f72bd7d Add more HttpClient stress tests
Commit migrated from https://github.com/dotnet/corefx/commit/1482013de9fa08e5834d92ce2884c194f93662fb
2016-04-26 10:41:41 -04:00
dotnet-bot 40d3f889c2 Updating CoreFX dependencies to rc3-24026-00
Commit migrated from https://github.com/dotnet/corefx/commit/b2704ed517b846992ffd66806d54ffdf4cb62526
2016-04-26 05:41:52 +00:00
Davis Goodin d8d35cf32b Validate that the results of a restore are exactly what was requested.
Also update buildtools to fix UpdatePackageDependencyVersion and fix dependencies on packages that had a minor version bump.


Commit migrated from https://github.com/dotnet/corefx/commit/11cafd348f9e0606e55ac5210de0d8847926dbfe
2016-04-25 11:42:47 -05:00
stephentoub 016a8bda35 Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/13b80c9fba1d358ad65519984b36b6b0a017c19e
2016-04-23 11:10:35 -04:00
stephentoub 6c4c36cd4d Add several outerloop HttpClient tests
Several "mini-stress" tests that verify HttpClient doesn't completely fall over under some load:
- Use one HttpClient instance to make many requests serially and in parallel
- Use multiple HttpClient instances to make many requests serially and in parallel
- Ensure that HttpResponseMessages can be GCd even if the associated response hasn't been fully drained.  This one fails right now on unix due to an open issue.


Commit migrated from https://github.com/dotnet/corefx/commit/4358712d3db870725a394478702e643018af52bf
2016-04-22 18:22:41 -04:00
Stephen Toub 093d6fe0e8 Merge pull request dotnet/corefx#7947 from stephentoub/cleanup_activeops
* Force CurlHandler active operations to shutdown when handler disposed

If the CurlHandler is disposed of while active operations are in progress, fail them.  This was generally already happening, but not reliably, and not with the right exception type (a cancellation exception).

Commit migrated from https://github.com/dotnet/corefx/commit/77cb6a2cddd973aeea08e0ceccb578603c1c1364
2016-04-22 09:54:52 -04:00
James Ko 47d83351a2 Avoid string.Split allocations in ContentDispositionHeaderValue (dotnet/corefx#7468)
* Avoid string.Split allocations in ContentDispositionHeaderValue
* Add tests for changes in ContentDispositionHeaderValue

Commit migrated from https://github.com/dotnet/corefx/commit/5bb608835c278482259bff96ac86160bc1a519af
2016-04-22 08:02:21 -04:00
stephentoub 65eda03d5a Force CurlHandler active operations to shutdown when handler disposed
If the CurlHandler is disposed of while active operations are in progress, fail them.  This was generally already happening, but not reliably, and not with the right exception type (a cancellation exception).


Commit migrated from https://github.com/dotnet/corefx/commit/f456d9d60dfec1cd7ff53c1ae5652bf1d76bd02c
2016-04-22 07:16:44 -04:00
dotnet-bot facf18bbf5 Updating CoreFX dependencies to rc3-24022-00
Commit migrated from https://github.com/dotnet/corefx/commit/5bfcca66e5c16c3c1585d1087acd2ea522eb17a7
2016-04-22 05:37:54 +00:00
Stephen Toub ab36076fa6 Size CurlHandler's SendTransferState based on content length (dotnet/corefx#7922)
* Size CurlHandler's SendTransferState based on content length

libcurl will never request more than 16K at a time from a request content stream, so our transfer state object allocates a 16K buffer to use the first time data needs to be transferred.  This size can be efficient in limiting the number of operations required in passing data around, but for small posts, it's an unnecessarily large size.  This commit changes the code to inspect the request content length, and if it's known to be less than 16K, that size is used instead.

Commit migrated from https://github.com/dotnet/corefx/commit/3c362496e358a8097538d81cf8aa6f69bb5493cc
2016-04-21 15:32:52 -04:00
Davis Goodin a7bcdba80c Merge pull request dotnet/corefx#7931 from dagood/fix-package-dependencies
Change non-existent package dependencies to actual versions

Commit migrated from https://github.com/dotnet/corefx/commit/06e1f406147f768f83f3607f4f87066ee796eac9
2016-04-21 09:51:35 -05:00
Stephen Toub e51d35ef2d Revert "Updating CoreFX dependencies to rc3-24021-00"
Commit migrated from https://github.com/dotnet/corefx/commit/019f436a0e66a807a7fefcc24095c5e158033bf8
2016-04-21 10:31:37 -04:00
dotnet-bot c7c632b514 Updating CoreFX dependencies to rc3-24021-00
Commit migrated from https://github.com/dotnet/corefx/commit/5cc2c6a3ce0d0a38fb6f8149bbfae16929f3cd00
2016-04-21 05:34:38 +00:00
Eric Eilebrecht 05b00b4f54 Merge pull request dotnet/corefx#7898 from ericeil/TODOcomments
Associate issues with more TODO comments in System.Net

Commit migrated from https://github.com/dotnet/corefx/commit/0f0a4bcc03db4bc709e100b2107d241f826dd1bb
2016-04-20 12:09:17 -07:00
Davis Goodin 5be2da2fc2 Change non-existent package dependencies to actual versions.
Commit migrated from https://github.com/dotnet/corefx/commit/28f021d9f269ea8207ede73d56b3cd99c8e19c96
2016-04-20 14:06:56 -05:00
Eric Eilebrecht 72de5bd512 Reference dotnet/corefx#7885 from TODO comment
Commit migrated from https://github.com/dotnet/corefx/commit/44022e8ff95ea068180a3a9583dc46bc7193f872
2016-04-20 10:05:53 -07:00
Eric Eilebrecht b50c8321c4 Use [TheoryAttribute] instead of manual looping over data.
Commit migrated from https://github.com/dotnet/corefx/commit/b50b076eb73ad53a5a3a84017a8e581ad5a964c8
2016-04-20 10:05:38 -07: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
Eric Eilebrecht 8d478ce19e Reference dotnet/corefx#5525 from TODO comments
Commit migrated from https://github.com/dotnet/corefx/commit/77eec5c96548a09b38a5ce59b1e110a765b02569
2016-04-20 10:03:40 -07:00
Lakshmi Priya Sekar 74c34921f1 Update xunit.netcore.extensions version.
Commit migrated from https://github.com/dotnet/corefx/commit/2134c046fa998522aa60159a2516b2f6bd7cc330
2016-04-19 19:16:41 -07:00
dotnet-bot cdbab74187 Updating CoreFX dependencies to rc3-24018-00
Commit migrated from https://github.com/dotnet/corefx/commit/b2e960386a786002b5cb724e64814dbb90eb4af4
2016-04-18 17:40:51 +00:00
David Shulman 28e1f8bf95 Merge pull request dotnet/corefx#7747 from StephenBonikowsky/patch-2
Find test builds files deeper in file structure.

Commit migrated from https://github.com/dotnet/corefx/commit/0d33c8cc3d5a730b2508e294b209fa666dc6cf55
2016-04-15 14:49:34 -07:00
dotnet-bot 03fd4d1c42 Updating CoreFX dependencies to rc3-24015-00
Commit migrated from https://github.com/dotnet/corefx/commit/a70774dac4088849551525d3ddd750d4e0cc4fbc
2016-04-15 06:40:27 +00:00
Stephen Bonikowsky ecd4e3032a Find test builds files deeper in file structure.
*

 In WCF repo many of our test projects are more than one level below the 'tests' directory.

*
If this doesn't break anything in corefx could we take this change?

* Amending to remove corefx\src\System.Net.Sockets\tests\PerformanceTests\System.Net.Sockets.Async.Performance.Tests.builds

* Amending again with more test .builds files that needed to be removed.


Commit migrated from https://github.com/dotnet/corefx/commit/8cac0d4afab96e15837818ca1abfbd9068008458
2016-04-14 18:20:32 -07:00
David Shulman 5d5c5fb77d Add Http redirect tests
Now that the Azure test endpoint has been updated, we can add more redirect tests that use different redirect status codes.

It isn't necessary to modify every existing test to use different codes. But I modified the important ones especially those using credentials.

Fixes dotnet/corefx#7505


Commit migrated from https://github.com/dotnet/corefx/commit/507901ff79c58c81853dd33f511921019ac62f04
2016-04-14 14:58:07 -07:00
dotnet-bot 875bffd0a5 Updating CoreFX dependencies to rc3-24014-01
Commit migrated from https://github.com/dotnet/corefx/commit/0c97843892b744f01ef65a5684a911f50a38ed93
2016-04-14 06:39:49 +00:00
David Shulman dbbd669af6 Initial System.Net.Http 4.1 contract
To support important customer scenarios for CoreFx RTM, we will be updating the System.Net.Http contract from 4.0 to 4.1. We are focusing on HttpClientHandler enhancements.

We will be submitting the final proposed list of additions as part of issue dotnet/corefx#7623. As part of updating the contract to 4.1, we are also OOB'ing the Desktop (net46 Windows) implementation so that the package won't be a facade over Desktop but rather a full implementation. This is possible since System.Net.Http has always been a standalone dll in the .NET Framework. As part of this, we are changing the implementation for Desktop from the legacy HttpWebRequest sockets stack to the WinHttpHandler stack based on native WinHTTP. This will give us a good path forward as WinHttpHandler stack will be getting HTTP/2.0 support with newer versions of Windows 10.

This initial PR has a few API additions that we are definitely going to be adding. It's important to get these changes into the builds so that we can fully bake the OOB Http.dll assembly on all the platforms and continue package testing.

There is an existing System.Net.Http.WebRequestHandler class in the .NET Framework located in System.Net.Http.WebRequest.dll. This class is a subclass of HttpClientHandler. Due to this, we are being careful not to cause collisions with some of these added properties. WebRequestHandler has a 'ClientCertificates' property and a 'ServerCertificateValidationCallback' property. So, we are aligning/renaming the properties as we add them to HttpClientHandler OOB assembly. This may get altered slightly as we finalize the 4.1 System.Net.Http API.


Commit migrated from https://github.com/dotnet/corefx/commit/97c940eec1f6afe3e4af31e72d79c3a11e7b1ff1
2016-04-13 09:50:34 -07:00
dotnet-bot ea45391f54 Updating CoreFX dependencies to rc3-24013-00
Commit migrated from https://github.com/dotnet/corefx/commit/32d2d84ff16efa0ed04dd2780c62db36bbf0bf01
2016-04-13 06:13:25 +00:00
Eric Mellino 3c5e57e248 Merge pull request dotnet/corefx#7651 from mellinoe/test-runtime-projectref-rebase2
Overhaul usage of test-runtime, Update buildtools

Commit migrated from https://github.com/dotnet/corefx/commit/9f90fdbdb3cc623dda7dc89f749172f619d0a767
2016-04-12 14:47:07 -07:00
Stephen Toub 061cdacc56 Merge pull request dotnet/corefx#7681 from stephentoub/fix_connecttimeout_test
Fix ConnectTimeout_TimesOut_Throws test

Commit migrated from https://github.com/dotnet/corefx/commit/20d6f81f7d03202cf62dc48e7ba42ea67a18d191
2016-04-12 17:41:37 -04:00
stephentoub 716f5ee544 Fix ConnectTimeout_TimesOut_Throws test
This test wasn't actually running because it was incorrectly annotated as a [Theory] but without any data.  When changed to be a [Fact], it failed because the test depends on the Socket's listening backlog being filled so that a subsequent connect will time out, but Listen(1) doesn't actually force the OS to use a queue of max size of 1, its just advisory.  The fix is to flood the server with requests that don't get accepted, filling the listen queue.


Commit migrated from https://github.com/dotnet/corefx/commit/883a32630a21c83bb91735cebf1d87c76691bd7d
2016-04-12 13:55:55 -04:00
Eric Mellino f57a495784 Overhaul usage of test-runtime.
This change uses some features available in an updated version of
buildtools. Instead of resolving the test-runtime for each of our test
projects as a separate step, we will now add a "reference" to it from the
project.json of each test project. This will allow us to resolve the nuget
assets from both it and the test project at the same time. This will be
more robust than our current process, which is very fragile and
error-prone.

The above is made possible by an updated version of
"PrereleaseResolveNuGetPackageAssets", which is the buildtools task
responsible for resolving test assets from nuget packages. This task also
has a lot of additional validation, which triggers a lot of warnings in
corefx. I've made various changes to csproj's and to project.json's around
the repository in order to satisfy those warnings.


Commit migrated from https://github.com/dotnet/corefx/commit/622ee8f512497fc07621de15e41c6bd575f387c9
2016-04-12 07:12:36 -07:00
dotnet-bot 203d37ef1e Updating CoreFX dependencies to rc3-24012-00
Commit migrated from https://github.com/dotnet/corefx/commit/f89a8267334562ab363ce19d4a2bfa0618bb1f00
2016-04-12 05:34:15 +00:00
stephentoub 014be97bdf Improve HttpContent tests
The tests are doing work in a way where if an async exception is changed to be synchronous, it likely goes unnoticed, and vice versa.  Tightening the tests.


Commit migrated from https://github.com/dotnet/corefx/commit/448a201f339137356e76bdb105916ea7459341d6
2016-04-11 21:59:22 -04:00
dotnet-bot 83f02c753f Updating CoreFX dependencies to rc3-24011-00
Commit migrated from https://github.com/dotnet/corefx/commit/406378b88f0485b549ec2b8c242c79329a5b3ef5
2016-04-11 16:13:03 +00:00
dotnet-bot 6883e89fc3 Updating CoreFX dependencies to rc3-24008-00
Commit migrated from https://github.com/dotnet/corefx/commit/30b74738cdac9c75a2dd165d339f206b1070f3cd
2016-04-08 06:40:37 +00:00
dotnet-bot 0f0193e356 Updating CoreFX dependencies to rc3-24007-00
Commit migrated from https://github.com/dotnet/corefx/commit/d9fdf25de0e1cf35219a26d4f840302e5379f292
2016-04-07 05:37:12 +00:00
Stephen Toub d3980a698e Merge pull request dotnet/corefx#7523 from ellismg/run-tests
Remove "UnsupportedPlatforms" metadata

Commit migrated from https://github.com/dotnet/corefx/commit/0cdc8e39f80a749bfa25eb559ab014be4f7ec557
2016-04-06 09:21:15 -04:00
dotnet-bot be7ca463ae Updating CoreFX dependencies to rc3-24006-00
Commit migrated from https://github.com/dotnet/corefx/commit/aff79bf3fa8ce8c13b6084d82aca30e534142b81
2016-04-06 05:21:19 +00:00
Matt Ellis e631e1c680 Remove UnsupportedPlatforms metadata
Commit migrated from https://github.com/dotnet/corefx/commit/f5252c0c0d19622132e0edcf0b64783b798e3bbf
2016-04-05 14:38:52 -07:00
Matt Ellis 68e4373e9a Reconsile .builds and UnsupportedPlatform metadata
There were a handful of test projects that just didn't have .builds
files and some other cases where the data in the .builds file did not
match what was in the UnsupportedPlatforms metadata.

Some of the projects said the tests were unsupported on FreeBSD and
nowhere else. Given that these tests should most likely be supported on
FreeBSD (given that OSX and Linux both supported them), I've not moved
that logic into the .builds files.

If there ends up being a specific set of tests that the FreeBSD port
team wants to disable long term, they can add .builds metadata as they
see fit.


Commit migrated from https://github.com/dotnet/corefx/commit/836c6f12e1a05749d7d5bf27d02bd28f98eb76aa
2016-04-05 11:51:49 -07:00