Commit Graph
76 Commits
Author SHA1 Message Date
Geoff Kizer 694a7a6172 implement connection retry logic and related changes
Commit migrated from https://github.com/dotnet/corefx/commit/64976bf062b6cbc55a3e708dbf7116188d075ff1
2018-01-31 10:03:23 -08:00
Geoff Kizer 47c423424d fix IDNA host name handling in proxy case, and add some IDNA tests
Commit migrated from https://github.com/dotnet/corefx/commit/36eb70cb80ec368df52ffd9b2257317bae8bdb47
2018-01-22 12:26:18 -08:00
Tyler Brinkley 9d61820b00 Made tests only apply to netcoreapp
Commit migrated from https://github.com/dotnet/corefx/commit/dff5efc1c3630e40c961d01049afd35475a29221
2018-01-01 21:00:31 -06:00
Lakshmi Priya Sekar 6ca6529323 Use generic test handling for remote server failures.
Commit migrated from https://github.com/dotnet/corefx/commit/d37b86ecf8606f007b32c9d60f623f50c874c723
2017-12-13 17:01:30 -08:00
Geoff Kizer cf5033763d add some basic protocol tests for status line handling
Commit migrated from https://github.com/dotnet/corefx/commit/79709c46a1e84ccae519ca58a12f9f29f0b64db5
2017-10-17 11:49:00 -04:00
Stephen Toub e16c674170 Increase file descriptor limit in S.N.Http tests on macOS
Commit migrated from https://github.com/dotnet/corefx/commit/2bce06e38f5c16ec6d6eed96a2c4410110fe5ec6
2017-09-21 21:31:49 -04:00
Stephen Toub 7be9b5bb5f Switch tests to use thread-local switch for ManagedHandler
And as a result re-enable parallelism of the test suite, which on my machine reduces the running time of the outerloop tests from 150s to 45s.


Commit migrated from https://github.com/dotnet/corefx/commit/3db504ec31fb03162b33e0658870aef5af4e4abe
2017-09-21 08:26:44 -04:00
Stephen Toub 29b6641eeb Add ReadOnlyMemoryContent to System.Net.Http (dotnet/corefx#24006)
* Add ReadOnlyMemoryContent to System.Net.Http

Allows `{ReadOnly}Memory<byte>`s to be uploaded in HttpClient requests.

* Address PR feedback

* Address more PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/d183fd34074fba9633f025fe2251e7d7883c7f25
2017-09-13 13:01:15 -07:00
Lakshmi Priya Sekar 82a42d0e68 Move test to windows specific.
Commit migrated from https://github.com/dotnet/corefx/commit/b95d60789528d2d920e4d58238ee3fd3260585de
2017-09-12 17:36:53 -07:00
Stephen Toub 262530fb1d Override Read/Write(span) on System.Net.Http streams (dotnet/corefx#23345)
Commit migrated from https://github.com/dotnet/corefx/commit/c351ba1f094871e4ae97f23f20f26648662cc4e6
2017-08-18 09:06:05 -04:00
Stephen Toub 945d60b1f5 Enable full duplex communication with ManagedHandler (dotnet/corefx#23180)
* Enable full duplex communication with ManagedHandler

ManagedHandler currently waits for all of the request content to be sent before it processes any response content.  While that matches with what many servers do (not sending any response content until all request content has been received), some sites and situations do benefit from or even require full duplex communication, such that the response can be processed even while the request content is being sent.  This change is also a necessary step towards enabling Expect: 100-continue, as we need to be able to receive the response header before having sent the content, and even without Expect: 100-continue, this allows us to stop sending a large request body if a server quickly sends back a status indicating the transfer isn't needed (e.g. a redirect).

This change also improves on the cancellation support for sending the request body.  The send cancellation token is now embedded in the request content stream and uses that token for all operations.

* Address PR feedback

- Don't force flush the headers before sending content.
- Skip the write buffer when using ContentLengthWriteStream
- Fix some typos


Commit migrated from https://github.com/dotnet/corefx/commit/a326d79a4fac6e82839ab1d672a2e536b6c81754
2017-08-13 06:07:13 -04:00
Tarek Mahmoud Sayed 3765a6069b Moving PlatformDetection to Corefx.Private.TestUtilities assembly (dotnet/corefx#23109)
* Moving PlatformDetection to Corefx.Private.TestUtilities assembly

The purpose of this change is to clean up all test projects instead of including the PlatformDetection code inside every test project, we’ll have it in the Corefx.Private.TestUtilities.
I have refactored the PlatformDetection to split the different implementation of Windows and Linux. If we need to do more refactoring there we can do it later as needed.

* Fix Linux BB

* Update the xunit package reference

* Fix wrong condition on one of the tests

* Update the ConditionalFact/Theory to use Type as a parameter


Commit migrated from https://github.com/dotnet/corefx/commit/878e2fcf5a9f1068015e5fada9231088663e3490
2017-08-10 22:37:36 -07:00
David Shulman 0e9da04ab9 Port TFS WinRT interop tests for HttpClient for UAP (dotnet/corefx#22239)
* Port TFS WinRT interop tests for HttpClient for UAP

Bring over the last of the WinRT interop tests for HttpClient. These
tests deal with interop between WinRT stream classes and .NET stream
classes.

Fixes dotnet/corefx#9044

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/7f4b8837ef77c3784cde0f57d17a5e656df86cb4
2017-07-14 09:01:11 -07:00
Hugh Bellamy 98b18432b7 Move AssertExtensions to Corefx.Private.TestUtilities (dotnet/corefx#21799)
* Move AssertExtensions to Corefx.Private.TestUtilities

* Update csprojs

* Fix Linq.Expressions uapaot build


Commit migrated from https://github.com/dotnet/corefx/commit/7e3b0db2892c56a431f8e99af9cd9381adec385a
2017-07-03 09:27:30 -07:00
Stephen Toub 849ab9a89b Separate ManagedHandlerTestHelpers into its own file
Commit migrated from https://github.com/dotnet/corefx/commit/083a1dc85c21ecb980e0af58f78af7af87254edd
2017-06-30 17:15:18 -04:00
Stephen Toub 1de0cf31b0 Integrate ManagedHandler into Windows and Unix builds
- Add a ManagedHandler field to both the Windows and Unix HttpClientHandler builds, and change the members to switch based on which is being used.  The default is still to use WinHttpHandler and CurlHandler respectively, but setting an environment variable prior to constructing an HttpClientHandler will switch it to use ManagedHandler.
- Add test classes that will run the tests again but with the managed handler.  Some of the test classes are commented out due to current failures.
- Fixed a few tests.


Commit migrated from https://github.com/dotnet/corefx/commit/b238d0d760a2588513c443f3a4c991222fd037bb
2017-06-22 09:26:46 -04:00
Tarek Mahmoud Sayed 8754550d62 Enable UAP Remote Execution for all tests (dotnet/corefx#21014)
This change to enable remote execution of all corefx tests in UAP. Because the remote execution code for UAP is using WinRT APIs and to avoid forcing adding UAP configuration to all test projects, we factor the remote execution code into its own test library (called TestHelper) which is cross compiled.

Commit migrated from https://github.com/dotnet/corefx/commit/eb2f543b189e8f7f9ae4c31e832ac9d3c22bb41a
2017-06-14 13:26:57 -07:00
Jose Perez Rodriguez 7ce5531fcc Fixing System.Net.Http.Functional tests on uapaot
Commit migrated from https://github.com/dotnet/corefx/commit/692343761c582dba996f83abfffe150bf854a614
2017-05-26 11:24:34 -07:00
Eric St. John 67a1a83adf Update configurations
Commit migrated from https://github.com/dotnet/corefx/commit/a152026c63c03dda2e470b780ecb4b3aa9671e11
2017-05-19 10:17:08 -07:00
Stephen Toub aed0fee2f6 Add DangerousAcceptAnyServerCertificateValidator property to HttpClientHandler
Commit migrated from https://github.com/dotnet/corefx/commit/2a9435284246f914dc854e195428527b38e52aae
2017-05-18 13:49:15 -04:00
Lakshmi Priya Sekar d13b95a549 Fixing OID EKU validation.
Commit migrated from https://github.com/dotnet/corefx/commit/023ecc91671ea48a0e27d466d13003d4830d671a
2017-05-10 13:29:13 -07:00
Alex Perovich 72abd52557 Fix S.Net.Http.Functional.Tests on AoT (dotnet/corefx#19133)
* Fix S.Net.Http.Functional.Tests on AoT

* Use partial files

* Use braces


Commit migrated from https://github.com/dotnet/corefx/commit/f8f72de4a453151ee38322166ffec0000ee3a7c6
2017-05-02 06:49:19 -04:00
Daniel Harvey 252cdc5e95 Bulk updates of tests for AssertExtensions (dotnet/corefx#18491)
Bulk update to AssertExtensions.Throws for AOT support. This doesn't disable Assert.Throws.

Commit migrated from https://github.com/dotnet/corefx/commit/b43b4df2e0e2182154bb0f425cb4a61bc1269828
2017-04-18 09:52:02 -07:00
Eric Mellino ddb473aac9 Move corefx onto the .NET Core 2.0 toolset
Commit migrated from https://github.com/dotnet/corefx/commit/8b471f76eef041f0cf40fec65c99a29b235bbe7d
2017-04-10 14:36:01 -07:00
Tarek Mahmoud Sayed 77cad86b1e Remove versioned configuration from test projects (dotnet/corefx#15879)
The changes onclude some other minor clean up in the test project files

Commit migrated from https://github.com/dotnet/corefx/commit/62212cca900081173fce70991c3a0b30393994a3
2017-02-06 13:52:11 -08:00
Karthik Rajasekaran 4bbdadd88a Update project configuration and sln files (dotnet/corefx#15182)
* Add ValidateVSConfigurations

* Update project config and sln files.


Commit migrated from https://github.com/dotnet/corefx/commit/f6ab339f446e37505f93ef9f430801fa1dcc05b8
2017-01-17 14:31:23 -08:00
Wes Haggard 848b9b15c0 Update documentation to include how to configure builds
Updates the documentation as well as config.json file with information on
RuntimeOS and the different ways to configure BuildConfiguration.

Cleans up InputOSGroup as it is no longer needed.

Cleans up TargetOS and makes it scoped only to the test command line generation

Add debugging information for TargetOS property for test runs.


Commit migrated from https://github.com/dotnet/corefx/commit/32bb7e8b9a472c8ea97537ce0a94511b4c7ca821
2017-01-09 13:32:45 -08:00
Jose Perez Rodriguez e5529a906d Make Test projects compile against the Targeting pack. (3/3 of the work) (dotnet/corefx#14534)
Commit migrated from https://github.com/dotnet/corefx/commit/c06e46913f93aa4d4eec880410c3edb4e5039639
2016-12-15 13:12:46 -08:00
Stephen Toub 74ac16201f Override CopyToAsync on LimitMemoryStream
The base MemoryStream's CopyToAsync implementation only provides its optimizations when the concrete type of the stream is MemoryStream and not for derived streams.  This commit adds a similar optimization to to LimitMemoryStream, such that it'll write its whole buffer to the destination in a single write.


Commit migrated from https://github.com/dotnet/corefx/commit/23b4fa71707970c7828af237fcee7ac0407f88be
2016-11-14 16:58:25 -05:00
Jeremy Kuhne f05a8c4187 Move IO types into System.Runtime.Extensions (dotnet/corefx#13451)
Move all of System.IO into System.Runtime.Extensions.
Finish moving System.IO.Primitives into System.Runtime.

Commit migrated from https://github.com/dotnet/corefx/commit/55eb2f16c4ccdb6e4c50a89af5c14ac843239901
2016-11-09 14:44:50 -08:00
Cristian Pop 1fb0a8ece8 TLS SystemDefault support.
Commit migrated from https://github.com/dotnet/corefx/commit/e882577f1cdf1c6505681c0a52a532d78f03c24f
2016-11-08 16:07:26 -08:00
Eric St. John f6f23740a5 Update Http tests to target ns1.7 + ns1.3
I had to add a namespace alias due to System.Configuration now being
defined by System.Runtime.


Commit migrated from https://github.com/dotnet/corefx/commit/6e86da5cc3efb88db6b932f01c9a4f9e66e84f8c
2016-10-20 14:31:18 -07:00
Cristian Pop ba43904a93 Adding server code. Fixing IIS application deployment.
Commit migrated from https://github.com/dotnet/corefx/commit/cb0becbb7e546ffa5f265f862e76bc0fa445ec50
2016-07-13 15:29:11 -07:00
Karthik Rajasekaran 5c93b350d3 Add NugetTargetMoniker to test projects and update remaining project references to pkgproj
Commit migrated from https://github.com/dotnet/corefx/commit/13e03705ced065850dc65900fccfd930426e87d7
2016-06-29 12:30:05 -07:00
Cristian Pop 7a3d76b180 Adding multi-machine scripts and unifying configuration.
Commit migrated from https://github.com/dotnet/corefx/commit/c354b2d44f6988a20a9f7be4a1b996ef7fbc873a
2016-06-28 12:38:07 -07:00
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
Christopher Costa 80bca9a4b4 Remove keepallprojectreferences
Commit migrated from https://github.com/dotnet/corefx/commit/25d4dbf46ed63abd4ff96a8f855f21c4420ae597
2016-06-07 10:15:34 -07:00
Stephen Toub ea6cd05418 Add some HttpClientHandler client certificate tests
And fix a small bug discovered from this, lack of argument validation when setting the enum value.


Commit migrated from https://github.com/dotnet/corefx/commit/483aa5a3012fe78ea001ece1b0404b18c0b90a29
2016-06-03 13:09:23 -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
dotnet-bot 52a5140af7 Use SchSendAuxRecord in SslStream on Windows.
[tfs-changeset: 1607766]


Commit migrated from https://github.com/dotnet/corefx/commit/91f1698b5139a0f618c0248e384c32d9bbe291c5
2016-05-24 17:01:01 -07:00
David Shulman 87cf76acf3 Fix cancellation of WinHttpHandler response stream reads
Reading from the response stream using ReadAsync() was ignoring the cancellation token passed in. To fix this, registered a delegate that will be called to dispose the WinHTTP request handle during pending I/O. This will cause the WinHTTP operation to cancel.

Added tests. For now, left them disabled to be resolved in issue dotnet/corefx#8692 next week. But wanted to get this fix in asap since it blocks partners for RTM.

Fixes dotnet/corefx#8662.


Commit migrated from https://github.com/dotnet/corefx/commit/a6e019d8e1910b9fed3c1077be23bfd9023d2837
2016-05-19 10:12:09 -07:00
David Shulman c04a0f68e8 Change some System.Net.Requests tests to use LoopbackServer
Changed HttpWebResponse test to use LoopbackServer.

More tests will be changed to use this server as part of
increasing test reliability and simplifying the requirements for the Azure test server.


Commit migrated from https://github.com/dotnet/corefx/commit/3aaaf19bd94bfcac533787ed45e1c3218168b7fa
2016-05-15 20:58:50 -07:00
stephentoub f44781c5fd Add test verifying HttpClient negotiates Tls12 when None specified
Commit migrated from https://github.com/dotnet/corefx/commit/22e060a3d7735a2b64bf4f409bee91d675866d39
2016-05-15 16:31:36 -04:00
David Shulman 354c2e5b9c System.Net.Http 4.1 contract implementation
As per approved dotnet/corefx#7623, add remaining properties to HttpClientHandler for
all platforms.

Move pre-existing Unix-only Http tests to run for all platforms.

Ensure that "credentials" related properties are secure by default and have
an initial (default) value of null.


Commit migrated from https://github.com/dotnet/corefx/commit/361b66146506a58f7d2c27224cc02f9583cd0639
2016-05-14 17:07:27 -07:00
chcosta a33dd88be4 Disable system.net.http.functiona.tests and system.net.security.functional.tests from projectreference->package dependency conversion. (dotnet/corefx#8505)
Commit migrated from https://github.com/dotnet/corefx/commit/e63e09b758daca6f16d62fa82f40608d18030aa0
2016-05-13 15:11:21 -07:00
stephentoub 095291bb48 Remove CurlHandler.ConnectTimeout property
I'd added this when bringing properties from WinHttpHandler to CurlHandler in bulk, with the expectation that we might expose them.  Since we're not planning on exposing this particular property from HttpClientHandler (turns out it's not very useful in practice), I'm removing it.


Commit migrated from https://github.com/dotnet/corefx/commit/953bbe0006ce7f29c87b798eb10d072df06d6f99
2016-05-13 07:46:47 -04:00
David Shulman 6489f6d1c9 Add configurable test settings for Http and WebSocket tests (dotnet/corefx#8480)
Building on the current use of environment variables for passing in test settings, added a common test helper class to allow the http and websocket tests to access alternate test servers. This will help with load balancing and network latency issues which are causing occasional timeouts in CI tests. This will also allow developers to run their own version of the Azure test endpoints. Consolidated the current environment variables used and standardized on a naming format.

Fixes dotnet/corefx#2383.

Commit migrated from https://github.com/dotnet/corefx/commit/3603ed2578220f0ecb2f101324e04acb80fa3196
2016-05-12 14:57:03 -07:00
stephentoub b8970ee51b Add SSL support to LoopbackServer in HTTP tests
We currently make a lot of calls off-box in our unit tests.  By adding SSL support to the loopback server, we should be able to convert many more tests to avoid needing to actually hit the network.  This adds such basic support, and converts a few tests to use it.

Also, since I was moving the certificate configuration code to a central location, I fixed an issue related to cleanup.


Commit migrated from https://github.com/dotnet/corefx/commit/b90795e1d5d7e8d8c68b9ca23d53b1ba0e392f46
2016-05-10 13:55:40 -04:00
David Shulman 087e92da43 Add DefaultCredentials scenario tests
These tests require the client and server to be on a Windows Active Directory domain. These tests are Windows specific. Currently this cannot be done in the CI system. So, these tests are only enabled when an environment variable is set which points to the test server.

There is a separate todo item dotnet/corefx#4989 to provide more automated scripts for setting up the test server. For now, there is a readme file with some details.

These tests will help support fixes for dotnet/corefx#8176 and related bugs.


Commit migrated from https://github.com/dotnet/corefx/commit/4739da8c8d4965fdaf2fc45ae915297208672d15
2016-05-03 15:53:33 -07: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