diff options
author | Michi Henning <michi@zeroc.com> | 2007-06-13 15:19:24 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-06-13 15:19:24 +1000 |
commit | ccf44c0a55d9c5a0028628c2ea71eae070c4c33f (patch) | |
tree | 1268cd9870e9f5aba0ad010c3f3bf16c82cc2cb2 /cpp | |
parent | Fixed deadlock in Freeze transactional evictor (diff) | |
download | ice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.tar.bz2 ice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.tar.xz ice-ccf44c0a55d9c5a0028628c2ea71eae070c4c33f.zip |
Bug 2225, proxy tests don't run with --protocol ssl.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Ice/proxy/AllTests.cpp | 32 |
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; |