diff options
Diffstat (limited to 'csharp/test/Ice/networkProxy/AllTests.cs')
-rw-r--r-- | csharp/test/Ice/networkProxy/AllTests.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/csharp/test/Ice/networkProxy/AllTests.cs b/csharp/test/Ice/networkProxy/AllTests.cs index 455fe310c60..b007535aab2 100644 --- a/csharp/test/Ice/networkProxy/AllTests.cs +++ b/csharp/test/Ice/networkProxy/AllTests.cs @@ -7,7 +7,7 @@ // // ********************************************************************** -public class AllTests : TestCommon.TestApp +public class AllTests : TestCommon.AllTests { private static Ice.IPConnectionInfo getIPConnectionInfo(Ice.ConnectionInfo info) { @@ -21,12 +21,19 @@ public class AllTests : TestCommon.TestApp return null; } - public static void allTests(Ice.Communicator communicator) + public static void allTests(TestCommon.Application app) { - string sref = "test:default -p 12010"; + Ice.Communicator communicator = app.communicator(); + string sref = "test:" + app.getTestEndpoint(0); Ice.ObjectPrx obj = communicator.stringToProxy(sref); test(obj != null); + int proxyPort = communicator.getProperties().getPropertyAsInt("Ice.HTTPProxyPort"); + if(proxyPort == 0) + { + proxyPort = communicator.getProperties().getPropertyAsInt("Ice.SOCKSProxyPort"); + } + Test.TestIntfPrx testPrx = Test.TestIntfPrxHelper.checkedCast(obj); test(testPrx != null); @@ -41,7 +48,7 @@ public class AllTests : TestCommon.TestApp Flush(); { Ice.IPConnectionInfo info = getIPConnectionInfo(testPrx.ice_getConnection().getInfo()); - test(info.remotePort == 12030 || info.remotePort == 12031); // make sure we are connected to the proxy port. + test(info.remotePort == proxyPort); // make sure we are connected to the proxy port. } WriteLine("ok"); |