diff options
Diffstat (limited to 'cpp/test/Ice/networkProxy/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/networkProxy/AllTests.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/test/Ice/networkProxy/AllTests.cpp b/cpp/test/Ice/networkProxy/AllTests.cpp index f1d2fa1fe71..49cd8789232 100644 --- a/cpp/test/Ice/networkProxy/AllTests.cpp +++ b/cpp/test/Ice/networkProxy/AllTests.cpp @@ -36,10 +36,16 @@ getIPConnectionInfo(const Ice::ConnectionInfoPtr& info) void allTests(const Ice::CommunicatorPtr& communicator) { - string sref = "test:default -p 12010"; + string sref = "test:" + getTestEndpoint(communicator, 0); Ice::ObjectPrxPtr obj = communicator->stringToProxy(sref); test(obj); + int proxyPort = communicator->getProperties()->getPropertyAsInt("Ice.HTTPProxyPort"); + if(proxyPort == 0) + { + proxyPort = communicator->getProperties()->getPropertyAsInt("Ice.SOCKSProxyPort"); + } + TestIntfPrxPtr test = ICE_CHECKED_CAST(TestIntfPrx, obj); test(test); @@ -52,7 +58,7 @@ allTests(const Ice::CommunicatorPtr& communicator) cout << "testing connection information... " << flush; { Ice::IPConnectionInfoPtr info = getIPConnectionInfo(test->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. } cout << "ok" << endl; |