summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/proxy/AllTests.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2007-06-13 15:19:24 +1000
committerMichi Henning <michi@zeroc.com>2007-06-13 15:19:24 +1000
commitccf44c0a55d9c5a0028628c2ea71eae070c4c33f (patch)
tree1268cd9870e9f5aba0ad010c3f3bf16c82cc2cb2 /cpp/test/Ice/proxy/AllTests.cpp
parentFixed deadlock in Freeze transactional evictor (diff)
downloadice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.tar.bz2
ice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.tar.xz
ice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.zip
Bug 2225, proxy tests don't run with --protocol ssl.
Diffstat (limited to 'cpp/test/Ice/proxy/AllTests.cpp')
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index 25ae4428034..f8dcca81b2b 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -614,7 +614,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(pstr == "test -t:tcp -h 127.0.0.1 -p 12010 -t 10000");
// Working?
- p1->ice_ping();
+ bool ssl = communicator->getProperties()->getProperty("Ice.Default.Protocol") == "ssl";
+ if(!ssl)
+ {
+ p1->ice_ping();
+ }
// Two legal TCP endpoints expressed as opaque endpoints
p1 = communicator->stringToProxy("test:opaque -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==:opaque -t 1 -v CTEyNy4wLjAuMusuAAAQJwAAAA==");
@@ -627,11 +631,19 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
p1 = communicator->stringToProxy("test:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
pstr = communicator->proxyToString(p1);
- test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ if(!ssl)
+ {
+ test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ }
+ else
+ {
+ test(pstr == "test -t:ssl -h 127.0.0.1 -p 10001:opaque -t 99 -v abch");
+ }
//
// Try to invoke on the SSL endpoint to verify that we get a
- // NoEndpointException.
+ // NoEndpointException (or ConnectionRefusedException when
+ // running with SSL).
//
try
{
@@ -640,6 +652,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const Ice::NoEndpointException&)
{
+ test(!ssl);
+ }
+ catch(const Ice::ConnectionRefusedException&)
+ {
+ test(ssl);
}
//
@@ -650,7 +667,14 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
Ice::ObjectPrx p2 = derived->echo(p1);
pstr = communicator->proxyToString(p2);
- test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ if(!ssl)
+ {
+ test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ }
+ else
+ {
+ test(pstr == "test -t:ssl -h 127.0.0.1 -p 10001:opaque -t 99 -v abch");
+ }
cout << "ok" << endl;