summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/faultTolerance
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/faultTolerance')
-rw-r--r--cpp/test/Ice/faultTolerance/AllTests.cpp4
-rw-r--r--cpp/test/Ice/faultTolerance/Client.cpp3
-rw-r--r--cpp/test/Ice/faultTolerance/Server.cpp6
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py48
4 files changed, 6 insertions, 55 deletions
diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp
index 5a861677c08..2bb1fbd862b 100644
--- a/cpp/test/Ice/faultTolerance/AllTests.cpp
+++ b/cpp/test/Ice/faultTolerance/AllTests.cpp
@@ -116,7 +116,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports)
ref << "test";
for(vector<int>::const_iterator p = ports.begin(); p != ports.end(); ++p)
{
- ref << ":default -p " << *p;
+ ref << ":" << getTestEndpoint(communicator, *p);
}
Ice::ObjectPrxPtr base = communicator->stringToProxy(ref.str());
test(base);
@@ -282,7 +282,7 @@ allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports)
#else
cout << "aborting server #" << i << " and #" << i + 1 << " with idempotent AMI call... " << flush;
CallbackPtr cb = new Callback;
- obj->begin_idempotentAbort(newCallback_TestIntf_idempotentAbort(cb, &Callback::response,
+ obj->begin_idempotentAbort(newCallback_TestIntf_idempotentAbort(cb, &Callback::response,
&Callback::exceptAbortI));
cb->check();
cout << "ok" << endl;
diff --git a/cpp/test/Ice/faultTolerance/Client.cpp b/cpp/test/Ice/faultTolerance/Client.cpp
index 5636653ac06..ef39a9be5b6 100644
--- a/cpp/test/Ice/faultTolerance/Client.cpp
+++ b/cpp/test/Ice/faultTolerance/Client.cpp
@@ -65,8 +65,7 @@ main(int argc, char* argv[])
try
{
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
+ Ice::InitializationData initData = getTestInitData(argc, argv);
initData.properties->setProperty("Ice.Warn.Connections", "0"); // test aborts
Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp
index c731d007786..9a6b0e63e75 100644
--- a/cpp/test/Ice/faultTolerance/Server.cpp
+++ b/cpp/test/Ice/faultTolerance/Server.cpp
@@ -9,6 +9,7 @@
#include <Ice/Ice.h>
#include <TestI.h>
+#include <TestCommon.h>
using namespace std;
@@ -49,7 +50,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
}
ostringstream endpts;
- endpts << "default -p " << port << ":udp";
+ endpts << getTestEndpoint(communicator, port) << ":udp";
communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpts.str());
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
Ice::ObjectPtr object = ICE_MAKE_SHARED(TestI);
@@ -73,8 +74,7 @@ main(int argc, char* argv[])
// our test servers may time out before they are used in the
// test.
//
- Ice::InitializationData initData;
- initData.properties = Ice::createProperties(argc, argv);
+ Ice::InitializationData initData = getTestInitData(argc, argv);
initData.properties->setProperty("Ice.ServerIdleTime", "120"); // Two minutes.
Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
deleted file mode 100755
index a581594fbbb..00000000000
--- a/cpp/test/Ice/faultTolerance/run.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-# **********************************************************************
-#
-# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-#
-# This copy of Ice is licensed to you under the terms described in the
-# ICE_LICENSE file included in this distribution.
-#
-# **********************************************************************
-
-import os, sys
-
-path = [ ".", "..", "../..", "../../..", "../../../..", "../../../../.." ]
-head = os.path.dirname(sys.argv[0])
-if len(head) > 0:
- path = [os.path.join(head, p) for p in path]
-path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
-if len(path) == 0:
- raise RuntimeError("can't find toplevel directory!")
-sys.path.append(os.path.join(path[0], "scripts"))
-import TestUtil
-
-server = os.path.join(os.getcwd(), TestUtil.getTestExecutable("server"))
-client = os.path.join(os.getcwd(), TestUtil.getTestExecutable("client"))
-
-num = 12
-base = 12340
-
-serverProc = []
-for i in range(0, num):
- sys.stdout.write("starting server #%d... " % (i + 1))
- sys.stdout.flush()
- serverProc.append(TestUtil.startServer(server, "%d" % (base + i)))
- print("ok")
-
-ports = ""
-for i in range(0, num):
- ports = "%s %d" % (ports, base + i)
-
-sys.stdout.write("starting client... ")
-sys.stdout.flush()
-clientProc = TestUtil.startClient(client, ports, startReader = False)
-print("ok")
-clientProc.startReader()
-
-clientProc.waitTestSuccess()
-for p in serverProc:
- p.waitTestSuccess()