You've already forked linux-packaging-mono
Imported Upstream version 6.8.0.73
Former-commit-id: d18deab1b47cfd3ad8cba82b3f37d00eec2170af
This commit is contained in:
parent
bceda29824
commit
73ee7591e8
@ -20,11 +20,15 @@ namespace MonoTests.Remoting.Http
|
||||
[Ignore ("This test somehow keeps http channel registered and then blocks any further http tests working. This also happens under .NET, so this test itself is wrong with nunit 2.4.8.")]
|
||||
public void Test ()
|
||||
{
|
||||
new HttpChannel (8086);
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = port;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
new HttpChannel (props, null, null);
|
||||
RemotingServices.Marshal (new Service (), "test");
|
||||
|
||||
Service remObj = (Service) RemotingServices.Connect (
|
||||
typeof (Service), "http://localhost:8086/test");
|
||||
typeof (Service), $"http://127.0.0.1:{port}/test");
|
||||
|
||||
ArrayList list;
|
||||
remObj.Test (out list);
|
||||
@ -70,13 +74,16 @@ namespace MonoTests.Remoting.Http
|
||||
public void Main ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
channel = new HttpChannel (port);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = port;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
channel = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (channel);
|
||||
RemotingConfiguration.RegisterWellKnownServiceType
|
||||
(typeof (Bug321420),"Server.soap", WellKnownObjectMode.Singleton);
|
||||
|
||||
Bug321420 s = (Bug321420) Activator.GetObject (typeof
|
||||
(Bug321420), $"http://localhost:{port}/Server.soap");
|
||||
(Bug321420), $"http://127.0.0.1:{port}/Server.soap");
|
||||
|
||||
// this works: s.Method ("a", "b");
|
||||
s.Method ("a", "a");
|
||||
@ -101,7 +108,7 @@ namespace MonoTests.Remoting.Http
|
||||
public void Main ()
|
||||
{
|
||||
Foo foo = (Foo) Activator.GetObject (typeof (Foo),
|
||||
$"http://localhost:{server.HttpPort}/Test");
|
||||
$"http://127.0.0.1:{server.HttpPort}/Test");
|
||||
|
||||
Bar bar = foo.Login ();
|
||||
if (bar != null)
|
||||
@ -146,7 +153,10 @@ namespace MonoTests.Remoting.Http
|
||||
public void Start ()
|
||||
{
|
||||
HttpPort = NetworkHelpers.FindFreePort ();
|
||||
c = new HttpChannel (HttpPort);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = HttpPort;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
c = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (c);
|
||||
|
||||
Type t = typeof(Foo);
|
||||
@ -174,11 +184,14 @@ namespace MonoTests.Remoting.Http
|
||||
[Test]
|
||||
public void Main ()
|
||||
{
|
||||
channel = new HttpChannel (0);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = 0;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
channel = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (channel);
|
||||
MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect (
|
||||
typeof (IFactorial),
|
||||
$"http://localhost:{server.HttpPort}/MyEndPoint");
|
||||
$"http://127.0.0.1:{server.HttpPort}/MyEndPoint");
|
||||
IFactorial cal = (IFactorial) obj;
|
||||
Assert.AreEqual (cal.CalculateFactorial (4), 24);
|
||||
}
|
||||
@ -216,7 +229,10 @@ namespace MonoTests.Remoting.Http
|
||||
public void Start ()
|
||||
{
|
||||
HttpPort = NetworkHelpers.FindFreePort ();
|
||||
c = new HttpChannel (HttpPort);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = HttpPort;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
c = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (c);
|
||||
|
||||
Type t = typeof(Calculator);
|
||||
|
Reference in New Issue
Block a user