Commit Graph
84 Commits
Author SHA1 Message Date
Marek Safar ba81e38ecc [System] WebHeaderCollection from referencesource 2016-05-18 14:44:07 +02:00
Alexander Köplinger 1492386668 [System/ServiceModel] Fix more hardcoded test ports
A test failed on Jenkins today with "address already in use".
Opportunistically replaced a few more hardcoded test ports to avoid failures in the future.
2016-03-05 15:50:28 +01:00
Ludovic Henry 83c7edc70e [SocketResponder] Start in constructor and Stop on Dispose
In conjuction with `using` we ensure that we Start and Stop the SocketResponder correctly, and everytime
2016-01-28 11:10:53 +00:00
Ludovic Henry 7f0b7cf022 [Tests] Use explicit delegate so it appears in stacktraces
In case of exception in this callback, the name of the test method will appear in the stacktrace, making debugging way easier.
2016-01-28 11:10:53 +00:00
Rolf Bjarne Kvinge f1b7be2f57 Remove Thread.[Abort|Suspend|Resume] from TvOS/WatchOS.
In tests replace usages of Thread.Abort with Thread.Interrupt when it looks
like it can work, otherwise just disable the complete test.
2015-11-19 12:54:36 +01:00
João Matos 7cb8061fa3 Fixed HttpWebRequestTest to compile with mobile NUnit.
Fixes an error in the mono-master-monodroid lane.

[9:24:52] Errors:
[9:24:52] 
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.sln (default targets) ->
[9:24:52] (Build target) ->
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.csproj (default targets) ->
[9:24:52] /Library/Frameworks/Mono.framework/Versions/4.2.0/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->
[9:24:52] 
[9:24:52] 	src/System/Test/System.Net/HttpWebRequestTest.cs(2336,13): error CS0117: `NUnit.Framework.Assert' does not contain a definition for `Greater'
[9:24:52] 
[9:24:52] 	 13 Warning(s)
[9:24:52] 	 1 Error(s)
2015-10-06 12:05:34 +01:00
BogdanovKirill 3445e2cf4e [HttpWebRequestTest] New test to check that after reading 2 GB of data from web server HttpWebRequest still works
When HttpWebRequest is used to download infinite (ContentLength is not set) response from web server, we must be sure that after reading 2 GB (Int32.MaxValue) of data our internal classes are still working correctly

This change is released under the MIT license.
2015-09-03 15:42:41 +05:00
Alexander Köplinger 98cf04084a [bcl] Remove NET_4_0 defines from class libs
NET_4_0 is always defined now, so the ifdefs are redundant.
I verified the libs are exactly the same after this change, so this is effectively a no-op.
2015-07-26 15:01:49 +02:00
Marek Habersack 04288920cc [tests] Disable until a server that works is found
This test depends on server behavior. I changed the server to xamarin.com
earlier on, but it stopped behaving as required recently. The test should
not rely on random servers, so until we have a server we can rely on I'm
disabling it.
2015-07-15 20:45:42 +02:00
Marek Habersack 28daa37f38 [tests] Use xamarin web server
http://elmundo.es/ started to send more than one cookie while
xamarin.com sends just one.
2015-07-15 20:45:22 +02:00
Marek Habersack 36288aca3a [tests] Don't assume specific charset
Don't assume a specific charset in HTTP response from a server. Google
changes response charset based on the country of the client's
IP. There's no point in checking for the specific charset, it's enough
to check whether the response header has correct format.
2015-07-15 20:45:21 +02:00
Marek Habersack edaa4926a4 [tests] Doesn't work on mobile 2015-07-15 20:45:14 +02:00
Marcin Cieslak c698cd9d23 [tests] Use LocalEphemeralEndPoint in HttpWebRequestTest 2015-06-13 11:02:42 +00:00
Marek Safar cd3707a51f [system] Fixes HttpWebRequest::AllowReadStreamBuffering 2015-01-05 12:48:29 +01:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Alexander Köplinger 2bacb92d36 [System] Fixed HttpWebRequest test that sometimes failed
The TestTimeoutPropertyWithServerThatDoesntExist test sometimes failed with a 'ConnectFailure' instead of a 'Timeout'.
As per the discussion in PR #1145, the test should actually check that a ConnectFailure is thrown before the timeout is reached.
This proved unreliable with the 10.128.200.100 IP address, as it was up to the networking stack to decide whether the endpoint can be reached,
which can take quite a long time (sometimes >100secs).

Instead, we now use the loopback address with a port where no service listens, which should be equivalent.

Additionally, the assert which checks for the correct exception switched the 'expected' and 'actual' parameter, which resulted in the wrong output, this is fixed as well.
2014-07-07 23:53:50 +02:00
Alexander Köplinger 7b5f4a511f [System] Use the same port number instead of a random port in HttpWebRequestTest
A random port doesn't add any value and resulted in at least one port conflict on monojenkins:
http://monojenkins.cloudapp.net/job/Mono/243/testReport/MonoTests.System.Net/HttpWebRequestTest/BeginGetRequestStreamCancelIfNotAllBytesWritten/
2014-06-22 20:10:17 +02:00
Rodrigo Kumpera e0f26cc241 Fix the build. 2013-06-26 14:59:45 -04:00
Martin Baulig e181a1a44d [System]: Partially fix #12393. 2013-06-26 01:35:28 +02:00
Andres G. Aragoneses 84202a68bb [HttpWebRequest] Assertion message nitpicks in new timeout tests
The timeout tests I added recently* had a missing assertion message and
one with a couple of typos.

* https://github.com/mono/mono/commit/96be7828510a1fb14dab07eed1e93dc1a3a7dd84
2013-05-17 00:48:10 +01:00
Andres G. Aragoneses 96be782851 [HttpWebRequest] Add timeout tests that cover BNC#317553 (ximian #74177)
The pull-request that was merged [1] intending to fix BXC#1183 [2] was
later reverted [3] because it broke a scenario that wasn't covered by tests.

This commits creates a couple of tests that cover this scenario (which was
implemented back in 2005 [4]) so that we are sure that any further proposed
fixes for bug 1183 [2] don't cause any regression in this area.

[1] https://github.com/mono/mono/commit/8c2167d52cb9acf9582647ebb5f99c92d9127fbd
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=11833
[3] https://github.com/mono/mono/commit/14f0405443693ec2586e73e4b3746134046210d5
[4] https://bugzilla.novell.com/show_bug.cgi?id=317553
2013-04-20 14:29:37 +01:00
Marek Safar f0ad346fb6 Mobile tests update 2013-02-22 21:41:19 +01:00
Martin Baulig 3a7a355522 [#7637][Web]: This is supposed to fail prior to .NET 4.0.
Fixes my previous commit 1ccb01e.
2012-10-29 15:47:49 +01:00
Martin Baulig 1ccb01e108 [#7637][Web]: Support empty write streams. 2012-10-27 01:15:21 +02:00
Martin Potter 6d56f4429e Unit tests for Bug #6405
Unit tests for https://bugzilla.xamarin.com/show_bug.cgi?id=6405
2012-08-06 12:00:39 -07:00
Martin Baulig 15053c403f Oops, actually remove the 'Date' header. 2012-06-26 03:06:56 +02:00
Martin Baulig abab46be8b Fix DateTime.MinValue in HttpWebRequest.Date.
* HttpWebRequestTest.cs: Extend this by adding each DateTimeKind
  and testing the result.  This test now passes again.
2012-06-26 02:51:09 +02:00
Marek Safar 1041e924c1 Fix few tests 2012-06-25 19:35:13 +01:00
Marek Safar 8fc4502bf7 Disable more tests 2012-06-25 11:48:38 +01:00
Marek Safar 4dd7b7e524 Enable fixed test 2012-06-19 12:34:51 +01:00
Marek Safar 7287c9cb10 Disable few more tests 2012-06-18 19:28:50 +01:00
Marek Safar 5dba4d1e7d Add timeout to webrequest tests 2012-06-15 11:15:57 +01:00
Marek Safar d22cff2d3f Disable not working test 2012-06-07 11:38:53 +01:00
Vinicius Jarina 7c32f15193 Removed broken tests from System 2012-06-04 09:12:20 -03:00
Marek Safar 11104b4ec8 Fix failing tests on .net 2011-12-07 18:34:26 +00:00
Marek Safar 1624a94ba1 Remove NET_2_0 2011-12-07 18:34:25 +00:00
Gonzalo Paniagua Javier 665cf6c6e6 Comment out test that does not work on linux. 2011-02-13 19:51:23 -05:00
Gonzalo Paniagua Javier fb13ef43ce [HttpWebRequest] Support 4.0 Date property. 2011-01-18 16:44:12 -05:00
Gonzalo Paniagua Javier 9ae3d21c17 [HttpWebRequest] Support 4.0 Host property. 2011-01-18 12:52:58 -05:00
Jonathan Pobst abee25f094 2010-01-15 Jonathan Pobst <[email protected]>
* HttpWebRequestTest.cs: Mark test WriteServerAborts as
	NotWorking.  Documented on bug #312968.

svn path=/trunk/mcs/; revision=149653
2010-01-15 22:45:38 +00:00
Gonzalo Paniagua Javier bc9b46831d 2009-07-09 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: use different ports for different tests since
	the shutdown might take a little bit and tests might conflict.


svn path=/trunk/mcs/; revision=137667
2009-07-10 03:21:35 +00:00
Gonzalo Paniagua Javier 64faaf06cf ignore test that fails on windows
svn path=/trunk/mcs/; revision=137665
2009-07-09 23:07:14 +00:00
Gert Driesen 8d403f0381 * WebConnectionStream.cs: Move and improve argument checks to match MS.
Modified CanRead and CanWrite to return false when instance is disposed.
* HttpWebRequestTest.cs: Enabled tests, and removed test that is now
covered by two separate CanTimeout tests for request and response
stream.
* HttpWebResponseStreamTest.cs: Enabled tests.

svn path=/trunk/mcs/; revision=137450
2009-07-06 19:58:00 +00:00
Gert Driesen ba7a4ef720 * HttpWebRequestTest.cs: Marked test notworking on 1.0 profile.
svn path=/trunk/mcs/; revision=137448
2009-07-06 19:34:33 +00:00
Gert Driesen 610473cb54 * HttpWebRequestTest.cs: Added tests for bug #511851. Added tests
for request stream. Fixed compiler warnings, and fixed code style.
* HttpWebResponseTest.cs: Added tests for response stream. Fixed
compiler warnings.

svn path=/trunk/mcs/; revision=137447
2009-07-06 19:30:33 +00:00
Gonzalo Paniagua Javier 09ff251a3a 2009-07-06 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: add tests for POST + redirect and 401.


svn path=/trunk/mcs/; revision=137429
2009-07-06 17:40:28 +00:00
Gonzalo Paniagua Javier 485b815f66 increase timeouts to make this work on machines under load
svn path=/trunk/mcs/; revision=137088
2009-06-29 15:52:42 +00:00
Gonzalo Paniagua Javier 0114287236 2009-06-28 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: sleep between reads as we do in
	WebClientTest.


svn path=/trunk/mcs/; revision=137052
2009-06-28 21:37:45 +00:00
Gonzalo Paniagua Javier d53f423926 fix timing issue
svn path=/trunk/mcs/; revision=137045
2009-06-28 07:15:41 +00:00
Gonzalo Paniagua Javier b022b6fd1a 2009-06-26 Gonzalo Paniagua Javier <[email protected]>
* HttpWebRequestTest.cs: add a bunch of tests provided by
	Bassan Tabbara.


svn path=/trunk/mcs/; revision=137021
2009-06-26 22:48:39 +00:00