Imported Upstream version 5.8.0.22

Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-10-19 20:04:20 +00:00
parent 5f4a27cc8a
commit 7d05485754
5020 changed files with 114082 additions and 186061 deletions

View File

@@ -35,6 +35,8 @@ using System.Runtime.Remoting.Channels.Tcp;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.Remoting
{
[TestFixture]
@@ -50,9 +52,10 @@ namespace MonoTests.Remoting
MarshalObject marshal = new MarshalObject ();
var port = NetworkHelpers.FindFreePort ();
IDictionary props = new Hashtable ();
props ["name"] = "marshal channel";
props ["port"] = 1236;
props ["port"] = port;
props ["bindTo"] = IPAddress.Loopback.ToString ();
chn = new TcpChannel (props, null, null);
@@ -62,11 +65,11 @@ namespace MonoTests.Remoting
urls = chn.GetUrlsForUri (SERVICE_URI);
Assert.IsNotNull (urls, "#A2");
Assert.AreEqual (1, urls.Length, "#A3");
Assert.AreEqual ("tcp://" + IPAddress.Loopback.ToString () + ":1236/" + SERVICE_URI, urls [0], "#A6");
Assert.AreEqual ($"tcp://{IPAddress.Loopback.ToString ()}:{port}/{SERVICE_URI}", urls [0], "#A6");
ds = chn.ChannelData as ChannelDataStore;
Assert.IsNotNull (ds, "#A4");
Assert.AreEqual (1, ds.ChannelUris.Length, "#A5");
Assert.AreEqual ("tcp://" + IPAddress.Loopback.ToString () + ":1236", ds.ChannelUris [0], "#A6");
Assert.AreEqual ($"tcp://{IPAddress.Loopback.ToString ()}:{port}", ds.ChannelUris [0], "#A6");
ChannelServices.UnregisterChannel (chn);