* [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.
//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
}
pool.ReleaseConnection(tds);
+ Listener.Stop ();
//exit
}
}