summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/exceptions/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
index f2b59201c11..7112e8f985a 100644
--- a/cpp/test/Ice/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -49,7 +49,27 @@ ThrowerPrx
allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
{
cout << "testing stringToProxy... " << flush;
- string ref("thrower:tcp -p 12345 -t 2000");
+ string ref;
+
+ Ice::PropertiesPtr properties = communicator->getProperties();
+
+ string protocol = properties->getProperty("Ice.Protocol");
+ string secure;
+
+ if (protocol.empty())
+ {
+ protocol = "tcp";
+ }
+
+ if (protocol.compare("ssl") == 0)
+ {
+ secure = " -s ";
+ }
+
+ string endpts = protocol + " -p 12345 -t 2000";
+
+ ref = "thrower" + secure + ":" + endpts;
+
Ice::ObjectPrx base = communicator->stringToProxy(ref);
test(base);
cout << "ok" << endl;