summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/allTests.py8
-rw-r--r--cpp/config/TestUtil.py8
-rw-r--r--cpp/test/Ice/operations/Twoways.cpp4
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp2
4 files changed, 13 insertions, 9 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index 4a11075ec53..c85f3252859 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -134,7 +134,7 @@ if isCygwin() == 0:
]
def usage():
- print "usage: " + sys.argv[0] + " -l -r <regex> -R <regex> --debug --protocol protocol --compress --host host --threadPerConnection --disablePool"
+ print "usage: " + sys.argv[0] + " -l -r <regex> -R <regex> --debug --protocol tcp|ssl --compress --host host --threadPerConnection --disablePool"
sys.exit(2)
try:
@@ -159,7 +159,11 @@ for o, a in opts:
else:
def rematch(x): return not regexp.search(x)
tests = filter(rematch, tests)
- if o in ( "--protocol", "--host" ):
+ if o == "--protocol":
+ if a not in ( "ssl", "tcp"):
+ usage()
+ args += " " + o + " " + a
+ if o == "--host" :
args += " " + o + " " + a
if o in ( "--debug", "--compress", "--threadPerConnection", "--disablePool" ):
args += " " + o
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index cf8da7df2bb..aa170d6e37e 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -10,8 +10,8 @@
# **********************************************************************
#
-# Set protocol to "ssl" in case you want to run the tests with the SSL
-# protocol. Otherwise TCP is used.
+# Set protocol to "ssl" in case you want to run the tests with the
+# SSL protocol. Otherwise TCP is used.
#
protocol = ""
#protocol = "ssl"
@@ -53,7 +53,7 @@ import sys, os, re, errno, getopt
from threading import Thread
def usage():
- print "usage: " + sys.argv[0] + " --debug --protocol protocol --compress --host host --threadPerConnection num"
+ print "usage: " + sys.argv[0] + " --debug --protocol ssl|tcp --compress --host host --threadPerConnection num"
sys.exit(2)
try:
opts, args = getopt.getopt(sys.argv[1:], "", ["debug", "protocol=", "compress", "host=", "threadPerConnection="])
@@ -64,6 +64,8 @@ for o, a in opts:
if o == "--debug":
debug = 1
if o == "--protocol":
+ if a not in ( "tcp", "ssl"):
+ usage()
protocol = a
if o == "--compress":
compress = 1
diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp
index 817fb88b262..55d9e0a2aab 100644
--- a/cpp/test/Ice/operations/Twoways.cpp
+++ b/cpp/test/Ice/operations/Twoways.cpp
@@ -694,7 +694,7 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
for(int i = 0; i < 3; i++)
{
Ice::InitializationData initData;
- initData.properties = Ice::createProperties();
+ initData.properties = communicator->getProperties()->clone();
initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
Ice::CommunicatorPtr ic = Ice::initialize(initData);
@@ -704,11 +704,9 @@ twoways(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
ctx["two"] = "TWO";
ctx["three"] = "THREE";
-
Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(
ic->stringToProxy("test:default -p 12010 -t 10000"));
-
ic->getImplicitContext()->setContext(ctx);
test(ic->getImplicitContext()->getContext() == ctx);
test(p->opContext() == ctx);
diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index 36262a2fbd9..4070f15a8a7 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -1331,7 +1331,7 @@ twowaysAMI(const Ice::CommunicatorPtr& communicator, const Test::MyClassPrx& p)
for(int i = 0; i < 3; i++)
{
Ice::InitializationData initData;
- initData.properties = Ice::createProperties();
+ initData.properties = communicator->getProperties()->clone();
initData.properties->setProperty("Ice.ImplicitContext", impls[i]);
Ice::CommunicatorPtr ic = Ice::initialize(initData);