summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2017-06-13 15:16:49 -0700
committerMark Spruiell <mes@zeroc.com>2017-06-13 15:16:49 -0700
commit08ba40f3b43ea30c62a188f74f5a43c1f7f5c13d (patch)
tree43aaeb6ed09b390ad4c003ddc372911b485a6693 /csharp/test
parentC++ & python test fixes (diff)
downloadice-08ba40f3b43ea30c62a188f74f5a43c1f7f5c13d.tar.bz2
ice-08ba40f3b43ea30c62a188f74f5a43c1f7f5c13d.tar.xz
ice-08ba40f3b43ea30c62a188f74f5a43c1f7f5c13d.zip
C# test fixes
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/adapterDeactivation/Server.cs2
-rw-r--r--csharp/test/Ice/binding/Server.cs2
-rw-r--r--csharp/test/Ice/dictMapping/Server.cs2
-rw-r--r--csharp/test/Ice/exceptions/AllTests.cs6
-rw-r--r--csharp/test/Ice/exceptions/Client.cs2
-rw-r--r--csharp/test/Ice/exceptions/Collocated.cs2
-rw-r--r--csharp/test/Ice/exceptions/Server.cs2
-rw-r--r--csharp/test/Ice/facets/AllTests.cs2
-rw-r--r--csharp/test/Ice/hold/Server.cs4
-rw-r--r--csharp/test/Ice/impl/Server.cs2
-rw-r--r--csharp/test/Ice/info/AllTests.cs11
-rw-r--r--csharp/test/Ice/invoke/Server.cs2
-rw-r--r--csharp/test/Ice/location/AllTests.cs2
-rw-r--r--csharp/test/Ice/location/Server.cs2
-rw-r--r--csharp/test/Ice/operations/Collocated.cs2
-rw-r--r--csharp/test/Ice/operations/Server.cs2
-rw-r--r--csharp/test/Ice/optional/Server.cs2
-rw-r--r--csharp/test/Ice/optional/ServerAMD.cs2
-rw-r--r--csharp/test/Ice/proxy/Server.cs2
-rw-r--r--csharp/test/Ice/slicing/exceptions/AllTests.cs223
-rw-r--r--csharp/test/Ice/threadPoolPriority/Server.cs2
21 files changed, 143 insertions, 135 deletions
diff --git a/csharp/test/Ice/adapterDeactivation/Server.cs b/csharp/test/Ice/adapterDeactivation/Server.cs
index 0a46acd3de3..2ee67bfa606 100644
--- a/csharp/test/Ice/adapterDeactivation/Server.cs
+++ b/csharp/test/Ice/adapterDeactivation/Server.cs
@@ -20,7 +20,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.ServantLocator locator = new ServantLocatorI();
adapter.addServantLocator(locator, "");
diff --git a/csharp/test/Ice/binding/Server.cs b/csharp/test/Ice/binding/Server.cs
index 800ba596b26..9128c62beac 100644
--- a/csharp/test/Ice/binding/Server.cs
+++ b/csharp/test/Ice/binding/Server.cs
@@ -20,7 +20,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.Identity id = Ice.Util.stringToIdentity("communicator");
adapter.add(new RemoteCommunicatorI(this), id);
diff --git a/csharp/test/Ice/dictMapping/Server.cs b/csharp/test/Ice/dictMapping/Server.cs
index 84df948bb28..0554a5a4967 100644
--- a/csharp/test/Ice/dictMapping/Server.cs
+++ b/csharp/test/Ice/dictMapping/Server.cs
@@ -20,7 +20,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new MyClassI(), Ice.Util.stringToIdentity("test"));
adapter.activate();
diff --git a/csharp/test/Ice/exceptions/AllTests.cs b/csharp/test/Ice/exceptions/AllTests.cs
index 95b4d35a8d5..80b21c2dd5a 100644
--- a/csharp/test/Ice/exceptions/AllTests.cs
+++ b/csharp/test/Ice/exceptions/AllTests.cs
@@ -62,7 +62,7 @@ public class AllTests : TestCommon.AllTests
// Expected
}
- communicator.getProperties().setProperty("TestAdapter0.Endpoints", "default");
+ communicator.getProperties().setProperty("TestAdapter0.Endpoints", "tcp -h *");
first = communicator.createObjectAdapter("TestAdapter0");
try
{
@@ -95,7 +95,7 @@ public class AllTests : TestCommon.AllTests
{
Write("testing servant registration exceptions... ");
- communicator.getProperties().setProperty("TestAdapter1.Endpoints", "default");
+ communicator.getProperties().setProperty("TestAdapter1.Endpoints", "tcp -h *");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter1");
Ice.Object obj = new EmptyI();
adapter.add(obj, Ice.Util.stringToIdentity("x"));
@@ -142,7 +142,7 @@ public class AllTests : TestCommon.AllTests
{
Write("testing servant locator registration exceptions... ");
- communicator.getProperties().setProperty("TestAdapter2.Endpoints", "default");
+ communicator.getProperties().setProperty("TestAdapter2.Endpoints", "tcp -h *");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter2");
Ice.ServantLocator loc = new ServantLocatorI();
adapter.addServantLocator(loc, "x");
diff --git a/csharp/test/Ice/exceptions/Client.cs b/csharp/test/Ice/exceptions/Client.cs
index 70ae0e59daf..94ad81c673d 100644
--- a/csharp/test/Ice/exceptions/Client.cs
+++ b/csharp/test/Ice/exceptions/Client.cs
@@ -30,7 +30,7 @@ public class Client : TestCommon.Application
{
Ice.InitializationData initData = base.getInitData(ref args);
initData.properties.setProperty("Ice.Warn.Connections", "0");
- initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0) + ":udp");
+ initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0));
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
return initData;
}
diff --git a/csharp/test/Ice/exceptions/Collocated.cs b/csharp/test/Ice/exceptions/Collocated.cs
index c9788d0d4f3..a17c73fd66f 100644
--- a/csharp/test/Ice/exceptions/Collocated.cs
+++ b/csharp/test/Ice/exceptions/Collocated.cs
@@ -33,7 +33,7 @@ public class Collocated : TestCommon.Application
Ice.InitializationData initData = base.getInitData(ref args);
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
- initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0) + ":udp");
+ initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0));
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
return initData;
}
diff --git a/csharp/test/Ice/exceptions/Server.cs b/csharp/test/Ice/exceptions/Server.cs
index 1794349d558..dbeec8c83eb 100644
--- a/csharp/test/Ice/exceptions/Server.cs
+++ b/csharp/test/Ice/exceptions/Server.cs
@@ -68,7 +68,7 @@ public class Server : TestCommon.Application
Ice.InitializationData initData = base.getInitData(ref args);
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.Warn.Connections", "0");
- initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0) + ":udp");
+ initData.properties.setProperty("TestAdapter.Endpoints", getTestEndpoint(initData.properties, 0));
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
initData.properties.setProperty("TestAdapter2.Endpoints", getTestEndpoint(initData.properties, 1));
initData.properties.setProperty("TestAdapter2.MessageSizeMax", "0");
diff --git a/csharp/test/Ice/facets/AllTests.cs b/csharp/test/Ice/facets/AllTests.cs
index 1f45c6c1017..defdc50d8d6 100644
--- a/csharp/test/Ice/facets/AllTests.cs
+++ b/csharp/test/Ice/facets/AllTests.cs
@@ -40,7 +40,7 @@ public class AllTests : TestCommon.AllTests
WriteLine("ok");
Write("testing facet registration exceptions... ");
- communicator.getProperties().setProperty("FacetExceptionTestAdapter.Endpoints", "default");
+ communicator.getProperties().setProperty("FacetExceptionTestAdapter.Endpoints", "tcp -h *");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("FacetExceptionTestAdapter");
Ice.Object obj = new EmptyI();
adapter.add(obj, Ice.Util.stringToIdentity("d"));
diff --git a/csharp/test/Ice/hold/Server.cs b/csharp/test/Ice/hold/Server.cs
index 2a36808a136..4a75c3e78ea 100644
--- a/csharp/test/Ice/hold/Server.cs
+++ b/csharp/test/Ice/hold/Server.cs
@@ -22,7 +22,7 @@ public class Server : TestCommon.Application
{
Timer timer = new Timer();
- communicator().getProperties().setProperty("TestAdapter1.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter1.Endpoints", getTestEndpoint(0));
communicator().getProperties().setProperty("TestAdapter1.ThreadPool.Size", "5");
communicator().getProperties().setProperty("TestAdapter1.ThreadPool.SizeMax", "5");
communicator().getProperties().setProperty("TestAdapter1.ThreadPool.SizeWarn", "0");
@@ -30,7 +30,7 @@ public class Server : TestCommon.Application
Ice.ObjectAdapter adapter1 = communicator().createObjectAdapter("TestAdapter1");
adapter1.add(new HoldI(timer, adapter1), Ice.Util.stringToIdentity("hold"));
- communicator().getProperties().setProperty("TestAdapter2.Endpoints", getTestEndpoint(1) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter2.Endpoints", getTestEndpoint(1));
communicator().getProperties().setProperty("TestAdapter2.ThreadPool.Size", "5");
communicator().getProperties().setProperty("TestAdapter2.ThreadPool.SizeMax", "5");
communicator().getProperties().setProperty("TestAdapter2.ThreadPool.SizeWarn", "0");
diff --git a/csharp/test/Ice/impl/Server.cs b/csharp/test/Ice/impl/Server.cs
index b05153c0720..a82eae1a42f 100644
--- a/csharp/test/Ice/impl/Server.cs
+++ b/csharp/test/Ice/impl/Server.cs
@@ -25,7 +25,7 @@ public class Server : TestCommon.Application
//
communicator().getProperties().setProperty("Ice.Warn.Connections", "0");
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new Test.MyDerivedClassI(), Ice.Util.stringToIdentity("test"));
adapter.activate();
diff --git a/csharp/test/Ice/info/AllTests.cs b/csharp/test/Ice/info/AllTests.cs
index f675223a849..095acbd80b6 100644
--- a/csharp/test/Ice/info/AllTests.cs
+++ b/csharp/test/Ice/info/AllTests.cs
@@ -85,12 +85,13 @@ public class AllTests : TestCommon.AllTests
}
WriteLine("ok");
- string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
Ice.ObjectAdapter adapter;
Write("test object adapter endpoint information... ");
Flush();
{
- communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -t 15000:udp");
+ string host = communicator.getProperties().getPropertyAsInt("Ice.IPv6") != 0 ? "::1" : "127.0.0.1";
+ communicator.getProperties().setProperty("TestAdapter.Endpoints", "tcp -h \"" + host +
+ "\" -t 15000:udp -h \"" + host + "\"");
adapter = communicator.createObjectAdapter("TestAdapter");
Ice.Endpoint[] endpoints = adapter.getEndpoints();
@@ -102,12 +103,12 @@ public class AllTests : TestCommon.AllTests
test(tcpEndpoint.type() == Ice.TCPEndpointType.value || tcpEndpoint.type() == Ice.SSLEndpointType.value ||
tcpEndpoint.type() == Ice.WSEndpointType.value || tcpEndpoint.type() == Ice.WSSEndpointType.value);
- test(tcpEndpoint.host.Equals(defaultHost));
+ test(tcpEndpoint.host.Equals(host));
test(tcpEndpoint.port > 0);
test(tcpEndpoint.timeout == 15000);
Ice.UDPEndpointInfo udpEndpoint = (Ice.UDPEndpointInfo)endpoints[1].getInfo();
- test(udpEndpoint.host.Equals(defaultHost));
+ test(udpEndpoint.host.Equals(host));
test(udpEndpoint.datagram());
test(udpEndpoint.port > 0);
@@ -150,6 +151,8 @@ public class AllTests : TestCommon.AllTests
app.getTestEndpoint(0, "udp"));
TestIntfPrx testIntf = TestIntfPrxHelper.checkedCast(@base);
+ string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
+
Write("test connection endpoint information... ");
Flush();
{
diff --git a/csharp/test/Ice/invoke/Server.cs b/csharp/test/Ice/invoke/Server.cs
index 1127057d2cc..7529bc6e84b 100644
--- a/csharp/test/Ice/invoke/Server.cs
+++ b/csharp/test/Ice/invoke/Server.cs
@@ -63,7 +63,7 @@ public class Server : TestCommon.Application
}
}
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.addServantLocator(new ServantLocatorI(async), "");
adapter.activate();
diff --git a/csharp/test/Ice/location/AllTests.cs b/csharp/test/Ice/location/AllTests.cs
index d9b2f34ef30..bc297ec590a 100644
--- a/csharp/test/Ice/location/AllTests.cs
+++ b/csharp/test/Ice/location/AllTests.cs
@@ -595,7 +595,7 @@ public class AllTests : TestCommon.AllTests
//
Ice.Properties properties = communicator.getProperties();
properties.setProperty("Ice.PrintAdapterReady", "0");
- Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("Hello", "default");
+ Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("Hello", "tcp -h *");
adapter.setLocator(locator);
Ice.Identity id = new Ice.Identity();
diff --git a/csharp/test/Ice/location/Server.cs b/csharp/test/Ice/location/Server.cs
index f9e03bbc8fd..36610f6f346 100644
--- a/csharp/test/Ice/location/Server.cs
+++ b/csharp/test/Ice/location/Server.cs
@@ -27,7 +27,7 @@ public class Server : TestCommon.Application
//
Ice.Properties properties = communicator().getProperties();
properties.setProperty("Ice.ThreadPool.Server.Size", "2");
- properties.setProperty("ServerManagerAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ properties.setProperty("ServerManagerAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("ServerManagerAdapter");
diff --git a/csharp/test/Ice/operations/Collocated.cs b/csharp/test/Ice/operations/Collocated.cs
index dacf64bf49c..84d18f78d60 100644
--- a/csharp/test/Ice/operations/Collocated.cs
+++ b/csharp/test/Ice/operations/Collocated.cs
@@ -21,7 +21,7 @@ public class Collocated : TestCommon.Application
public override int run(string[] args)
{
communicator().getProperties().setProperty("TestAdapter.AdapterId", "test");
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.ObjectPrx prx = adapter.add(new MyDerivedClassI(), Ice.Util.stringToIdentity("test"));
//adapter.activate(); // Don't activate OA to ensure collocation is used.
diff --git a/csharp/test/Ice/operations/Server.cs b/csharp/test/Ice/operations/Server.cs
index c50a2549772..9e4a8db9b39 100644
--- a/csharp/test/Ice/operations/Server.cs
+++ b/csharp/test/Ice/operations/Server.cs
@@ -25,7 +25,7 @@ public class Server : TestCommon.Application
//
communicator().getProperties().setProperty("Ice.Warn.Connections", "0");
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new MyDerivedClassI(), Ice.Util.stringToIdentity("test"));
adapter.activate();
diff --git a/csharp/test/Ice/optional/Server.cs b/csharp/test/Ice/optional/Server.cs
index 40b3027e938..13f93c737c6 100644
--- a/csharp/test/Ice/optional/Server.cs
+++ b/csharp/test/Ice/optional/Server.cs
@@ -21,7 +21,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new InitialI(), Ice.Util.stringToIdentity("initial"));
adapter.activate();
diff --git a/csharp/test/Ice/optional/ServerAMD.cs b/csharp/test/Ice/optional/ServerAMD.cs
index eb0cc83285b..362d056de80 100644
--- a/csharp/test/Ice/optional/ServerAMD.cs
+++ b/csharp/test/Ice/optional/ServerAMD.cs
@@ -20,7 +20,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new InitialI(), Ice.Util.stringToIdentity("initial"));
adapter.activate();
diff --git a/csharp/test/Ice/proxy/Server.cs b/csharp/test/Ice/proxy/Server.cs
index 20aafbe3be8..2e821bde02d 100644
--- a/csharp/test/Ice/proxy/Server.cs
+++ b/csharp/test/Ice/proxy/Server.cs
@@ -26,7 +26,7 @@ public class Server : TestCommon.Application
communicator().getProperties().setProperty("Ice.Warn.Connections", "0");
communicator().getProperties().setProperty("Ice.Warn.Dispatch", "0");
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new MyDerivedClassI(), Ice.Util.stringToIdentity("test"));
adapter.activate();
diff --git a/csharp/test/Ice/slicing/exceptions/AllTests.cs b/csharp/test/Ice/slicing/exceptions/AllTests.cs
index a857eff87ea..46942a0b730 100644
--- a/csharp/test/Ice/slicing/exceptions/AllTests.cs
+++ b/csharp/test/Ice/slicing/exceptions/AllTests.cs
@@ -1112,122 +1112,127 @@ public class AllTests : TestCommon.AllTests
}
WriteLine("ok");
- Write("preserved exceptions... ");
- Flush();
+ string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
+ if(defaultHost.Equals("127.0.0.1") || defaultHost.Equals("::1"))
{
- Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("Relay", "default");
- RelayPrx relay = RelayPrxHelper.uncheckedCast(adapter.addWithUUID(new RelayI()));
- adapter.activate();
-
- try
- {
- testPrx.relayKnownPreservedAsBase(relay);
- test(false);
- }
- catch(KnownPreservedDerived ex)
+ Write("preserved exceptions... ");
+ Flush();
{
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- }
- catch(Ice.OperationNotExistException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
+ Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("Relay", "default");
+ RelayPrx relay = RelayPrxHelper.uncheckedCast(adapter.addWithUUID(new RelayI()));
+ adapter.activate();
- try
- {
- testPrx.relayKnownPreservedAsKnownPreserved(relay);
- test(false);
- }
- catch(KnownPreservedDerived ex)
- {
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- }
- catch(Ice.OperationNotExistException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
+ try
+ {
+ testPrx.relayKnownPreservedAsBase(relay);
+ test(false);
+ }
+ catch(KnownPreservedDerived ex)
+ {
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ }
+ catch(Exception)
+ {
+ test(false);
+ }
- try
- {
- testPrx.relayUnknownPreservedAsBase(relay);
- test(false);
- }
- catch(Preserved2 ex)
- {
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- test(ex.p1.ice_id().Equals(PreservedClass.ice_staticId()));
- PreservedClass pc = ex.p1 as PreservedClass;
- test(pc.bc.Equals("bc"));
- test(pc.pc.Equals("pc"));
- test(ex.p2 == ex.p1);
- }
- catch(KnownPreservedDerived ex)
- {
- //
- // For the 1.0 encoding, the unknown exception is sliced to KnownPreserved.
- //
- test(testPrx.ice_getEncodingVersion().Equals(Ice.Util.Encoding_1_0));
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- }
- catch(Ice.OperationNotExistException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
+ try
+ {
+ testPrx.relayKnownPreservedAsKnownPreserved(relay);
+ test(false);
+ }
+ catch(KnownPreservedDerived ex)
+ {
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ }
+ catch(Exception)
+ {
+ test(false);
+ }
- try
- {
- testPrx.relayUnknownPreservedAsKnownPreserved(relay);
- test(false);
- }
- catch(Preserved2 ex)
- {
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- test(ex.p1.ice_id().Equals(PreservedClass.ice_staticId()));
- PreservedClass pc = ex.p1 as PreservedClass;
- test(pc.bc.Equals("bc"));
- test(pc.pc.Equals("pc"));
- test(ex.p2 == ex.p1);
- }
- catch(KnownPreservedDerived ex)
- {
- //
- // For the 1.0 encoding, the unknown exception is sliced to KnownPreserved.
- //
- test(testPrx.ice_getEncodingVersion().Equals(Ice.Util.Encoding_1_0));
- test(ex.b.Equals("base"));
- test(ex.kp.Equals("preserved"));
- test(ex.kpd.Equals("derived"));
- }
- catch(Ice.OperationNotExistException)
- {
- }
- catch(Exception)
- {
- test(false);
- }
+ try
+ {
+ testPrx.relayUnknownPreservedAsBase(relay);
+ test(false);
+ }
+ catch(Preserved2 ex)
+ {
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ test(ex.p1.ice_id().Equals(PreservedClass.ice_staticId()));
+ PreservedClass pc = ex.p1 as PreservedClass;
+ test(pc.bc.Equals("bc"));
+ test(pc.pc.Equals("pc"));
+ test(ex.p2 == ex.p1);
+ }
+ catch(KnownPreservedDerived ex)
+ {
+ //
+ // For the 1.0 encoding, the unknown exception is sliced to KnownPreserved.
+ //
+ test(testPrx.ice_getEncodingVersion().Equals(Ice.Util.Encoding_1_0));
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ }
+ catch(Exception)
+ {
+ test(false);
+ }
+
+ try
+ {
+ testPrx.relayUnknownPreservedAsKnownPreserved(relay);
+ test(false);
+ }
+ catch(Preserved2 ex)
+ {
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ test(ex.p1.ice_id().Equals(PreservedClass.ice_staticId()));
+ PreservedClass pc = ex.p1 as PreservedClass;
+ test(pc.bc.Equals("bc"));
+ test(pc.pc.Equals("pc"));
+ test(ex.p2 == ex.p1);
+ }
+ catch(KnownPreservedDerived ex)
+ {
+ //
+ // For the 1.0 encoding, the unknown exception is sliced to KnownPreserved.
+ //
+ test(testPrx.ice_getEncodingVersion().Equals(Ice.Util.Encoding_1_0));
+ test(ex.b.Equals("base"));
+ test(ex.kp.Equals("preserved"));
+ test(ex.kpd.Equals("derived"));
+ }
+ catch(Ice.OperationNotExistException)
+ {
+ }
+ catch(Exception)
+ {
+ test(false);
+ }
- adapter.destroy();
+ adapter.destroy();
+ }
+ WriteLine("ok");
}
- WriteLine("ok");
+
return testPrx;
}
}
diff --git a/csharp/test/Ice/threadPoolPriority/Server.cs b/csharp/test/Ice/threadPoolPriority/Server.cs
index 95d72860742..e939b5d91ad 100644
--- a/csharp/test/Ice/threadPoolPriority/Server.cs
+++ b/csharp/test/Ice/threadPoolPriority/Server.cs
@@ -20,7 +20,7 @@ public class Server : TestCommon.Application
{
public override int run(string[] args)
{
- communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0) + ":udp");
+ communicator().getProperties().setProperty("TestAdapter.Endpoints", getTestEndpoint(0));
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
adapter.add(new PriorityI(), Ice.Util.stringToIdentity("test"));
adapter.activate();