Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel de la Pena <v-mandel@microsoft.com>2017-09-08 14:05:48 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2017-09-08 14:05:48 +0300
commita09b912b86e0d488f13d6c1b0b2276e94e0f9499 (patch)
treee191b66ea05af6af937ba66fbe71b05d8c82024f /mcs/class/Mono.Data.Tds
parent91149fb1e524882128d180a9ba5f4d0f13e31521 (diff)
[Tests] Fix Mono.Data.Tds tests on iOS (#5501)
* [Tests] Fix Mono.Data.Tds tests on iOS The modified tests failed on iOS following PR: https://github.com/xamarin/xamarin-macios/pull/2580 that adds support for Xharness to run the Mono.Data.Tds on Xamarin.iOS. With the changes the tests run a expected. * Close Listener when done.
Diffstat (limited to 'mcs/class/Mono.Data.Tds')
-rw-r--r--mcs/class/Mono.Data.Tds/Test/bug-4786.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
index 91f8a06fc1a..ed44567b40d 100644
--- a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
+++ b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
@@ -51,13 +51,10 @@ namespace MonoTests.Mono.Data.Tds
//require at this point: a listener on port 1433...
try{
- Socket Listener = new Socket(AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
IPAddress hostIP =Dns.GetHostEntry("localhost").AddressList[0];
- IPEndPoint ep = new IPEndPoint(hostIP, 1433);
- Listener.Bind(ep);
- Listener.Listen(1);
+ IPEndPoint ep = new IPEndPoint(hostIP, 1433);
+ TcpListener Listener = new TcpListener (ep);
+ Listener.Start ();
} catch (Exception){
//ignore
}
@@ -103,6 +100,7 @@ namespace MonoTests.Mono.Data.Tds
pool.ReleaseConnection(tds);
+ Listener.Stop ();
//exit
}
}