diff options
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/IcePack/simple/AllTests.cpp | 2 | ||||
-rw-r--r-- | cpp/test/IcePack/simple/Client.cpp | 8 | ||||
-rw-r--r-- | cpp/test/IcePack/simple/Collocated.cpp | 2 | ||||
-rw-r--r-- | cpp/test/IcePack/simple/Server.cpp | 2 | ||||
-rwxr-xr-x | cpp/test/IcePack/simple/run.py | 37 |
5 files changed, 41 insertions, 10 deletions
diff --git a/cpp/test/IcePack/simple/AllTests.cpp b/cpp/test/IcePack/simple/AllTests.cpp index 9d36cf379af..b48bc16f91a 100644 --- a/cpp/test/IcePack/simple/AllTests.cpp +++ b/cpp/test/IcePack/simple/AllTests.cpp @@ -19,7 +19,7 @@ TestPrx allTests(Ice::CommunicatorPtr communicator) { cout << "testing stringToProxy... " << flush; - string ref("test:tcp -p 12346 -t 2000"); + string ref("test:tcp -p 12346 -t 5000"); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/IcePack/simple/Client.cpp b/cpp/test/IcePack/simple/Client.cpp index 6a73321427d..3ae77a6499d 100644 --- a/cpp/test/IcePack/simple/Client.cpp +++ b/cpp/test/IcePack/simple/Client.cpp @@ -18,8 +18,12 @@ int run(int argc, char* argv[], Ice::CommunicatorPtr communicator) { TestPrx allTests(Ice::CommunicatorPtr); - TestPrx test = allTests(communicator); - test->shutdown(); + TestPrx obj = allTests(communicator); + + cout << "shutting down server... " << flush; + obj->shutdown(); + cout << "ok" << endl; + return EXIT_SUCCESS; } diff --git a/cpp/test/IcePack/simple/Collocated.cpp b/cpp/test/IcePack/simple/Collocated.cpp index 5df83c02733..5c02cfc2e94 100644 --- a/cpp/test/IcePack/simple/Collocated.cpp +++ b/cpp/test/IcePack/simple/Collocated.cpp @@ -16,7 +16,7 @@ using namespace std; int run(int argc, char* argv[], Ice::CommunicatorPtr communicator) { - string endpts("tcp -p 12345 -t 2000"); + string endpts("tcp -p 12345 -t 5000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, "test"); diff --git a/cpp/test/IcePack/simple/Server.cpp b/cpp/test/IcePack/simple/Server.cpp index 075d4a084f4..3ec39518793 100644 --- a/cpp/test/IcePack/simple/Server.cpp +++ b/cpp/test/IcePack/simple/Server.cpp @@ -16,7 +16,7 @@ using namespace std; int run(int argc, char* argv[], Ice::CommunicatorPtr communicator) { - string endpts("tcp -p 12345 -t 2000"); + string endpts("tcp -p 12345 -t 5000"); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, "test"); diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py index 2772753b7ab..6305848431f 100755 --- a/cpp/test/IcePack/simple/run.py +++ b/cpp/test/IcePack/simple/run.py @@ -25,8 +25,8 @@ icePackAdmin = os.path.normpath(toplevel + "/bin/icepackadmin") print "starting icepack...", icePackPipe = os.popen(icePack + ' --Ice.PrintProcessId --nowarn' + \ - r' "--Ice.Adapter.Forward.Endpoints=tcp -p 12346 -t 2000"' + \ - r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 2000"') + r' "--Ice.Adapter.Forward.Endpoints=tcp -p 12346 -t 5000"' + \ + r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 5000"') output = icePackPipe.readline().strip() if not output: print "failed!" @@ -36,8 +36,8 @@ print "ok" print "registering server with icepack...", icePackAdminPipe = os.popen(icePackAdmin + \ - r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 2000"' + \ - r' -e "add \"test:tcp -p 12345 -t 2000\""') + r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 5000"' + \ + r' -e "add \"test:tcp -p 12345 -t 5000\""') icePackAdminPipe.close() print "ok" @@ -45,9 +45,36 @@ name = "IcePack/simple" TestUtil.clientServerTest(toplevel, name) TestUtil.collocatedTest(toplevel, name) +if os.name != "nt": + testdir = os.path.normpath(toplevel + "/test/IcePack/simple") + server = os.path.normpath(testdir + "/server") + client = os.path.normpath(testdir + "/client") + + print "registering server with icepack for automatic activation...", + icePackAdminPipe = os.popen(icePackAdmin + \ + r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 5000"' + \ + r' -e "add \"test:tcp -p 12345 -t 5000\" \"' + server + r'\""') + icePackAdminPipe.close() + print "ok" + + print "starting client...", + clientPipe = os.popen(client) + output = clientPipe.readline() + if not output: + print "failed!" + TestUtil.killServers() + sys.exit(0) + print "ok" + print output, + while 1: + output = clientPipe.readline() + if not output: + break; + print output, + print "shutting down icepack...", icePackAdminPipe = os.popen(icePackAdmin + \ - r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 2000"' + \ + r' "--Ice.Adapter.Admin.Endpoints=tcp -p 12347 -t 5000"' + \ r' -e "shutdown"') icePackAdminPipe.close() print "ok" |