You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
@ -16,6 +16,8 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.Net
|
||||
{
|
||||
[TestFixture]
|
||||
@ -1415,10 +1417,11 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
public void UploadValues1 ()
|
||||
{
|
||||
IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
|
||||
string url = "http://" + IPAddress.Loopback.ToString () + ":8000/test/";
|
||||
IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint ();
|
||||
string url = "http://" + ep.ToString () + "/test/";
|
||||
|
||||
using (SocketResponder responder = new SocketResponder (ep, new SocketRequestHandler (EchoRequestHandler))) {
|
||||
responder.Start ();
|
||||
@ -1781,9 +1784,10 @@ namespace MonoTests.System.Net
|
||||
|
||||
#if NET_4_5
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
public void UploadStringAsyncCancelEvent ()
|
||||
{
|
||||
UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
|
||||
UploadAsyncCancelEventTest (9301, (webClient, uri, cancelEvent) =>
|
||||
{
|
||||
|
||||
webClient.UploadStringCompleted += (sender, args) =>
|
||||
@ -1797,9 +1801,10 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
public void UploadDataAsyncCancelEvent ()
|
||||
{
|
||||
UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
|
||||
UploadAsyncCancelEventTest (9302, (webClient, uri, cancelEvent) =>
|
||||
{
|
||||
webClient.UploadDataCompleted += (sender, args) =>
|
||||
{
|
||||
@ -1812,9 +1817,10 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
public void UploadValuesAsyncCancelEvent ()
|
||||
{
|
||||
UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
|
||||
UploadAsyncCancelEventTest (9303, (webClient, uri, cancelEvent) =>
|
||||
{
|
||||
webClient.UploadValuesCompleted += (sender, args) =>
|
||||
{
|
||||
@ -1827,9 +1833,10 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
public void UploadFileAsyncCancelEvent ()
|
||||
{
|
||||
UploadAsyncCancelEventTest ((webClient, uri, cancelEvent) =>
|
||||
UploadAsyncCancelEventTest (9304,(webClient, uri, cancelEvent) =>
|
||||
{
|
||||
string tempFile = Path.Combine (_tempFolder, "upload.tmp");
|
||||
File.Create (tempFile).Close ();
|
||||
@ -1845,6 +1852,7 @@ namespace MonoTests.System.Net
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("AndroidNotWorking")] // Test suite hangs if the tests runs as part of the entire BCL suite. Works when only this fixture is ran
|
||||
public void UploadFileAsyncContentType ()
|
||||
{
|
||||
var serverUri = "http://localhost:13370/";
|
||||
@ -1868,10 +1876,10 @@ namespace MonoTests.System.Net
|
||||
#endif
|
||||
|
||||
#if NET_4_0
|
||||
public void UploadAsyncCancelEventTest (Action<WebClient, Uri, EventWaitHandle> uploadAction)
|
||||
public void UploadAsyncCancelEventTest (int port, Action<WebClient, Uri, EventWaitHandle> uploadAction)
|
||||
{
|
||||
var ep = new IPEndPoint (IPAddress.Loopback, 8000);
|
||||
string url = "http://" + IPAddress.Loopback + ":8000/test/";
|
||||
var ep = NetworkHelpers.LocalEphemeralEndPoint ();
|
||||
string url = "http://" + ep.ToString() + "/test/";
|
||||
|
||||
using (var responder = new SocketResponder (ep, EchoRequestHandler))
|
||||
{
|
||||
|
Reference in New Issue
Block a user