summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceStorm/federation/Subscriber.cpp34
-rwxr-xr-xcpp/test/IceStorm/federation/run.py103
-rw-r--r--cpp/test/IceStorm/federation2/Subscriber.cpp34
-rwxr-xr-xcpp/test/IceStorm/federation2/run.py100
-rw-r--r--cpp/test/IceStorm/single/Subscriber.cpp33
-rwxr-xr-xcpp/test/IceStorm/single/run.py41
-rw-r--r--cpp/test/IceStorm/stress/Subscriber.cpp10
7 files changed, 92 insertions, 263 deletions
diff --git a/cpp/test/IceStorm/federation/Subscriber.cpp b/cpp/test/IceStorm/federation/Subscriber.cpp
index d7aaf91d256..181d1e839e1 100644
--- a/cpp/test/IceStorm/federation/Subscriber.cpp
+++ b/cpp/test/IceStorm/federation/Subscriber.cpp
@@ -61,31 +61,9 @@ int EventI::_count = 0;
IceUtil::StaticMutex EventI::_countMutex = ICE_STATIC_MUTEX_INITIALIZER;
void
-createLock(const string& name)
-{
- int fd = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0777);
- assert(fd != -1);
- close(fd);
-}
-
-void
-deleteLock(const string& name)
-{
-#ifdef _WIN32
- int ret = _unlink(name.c_str());
-#else
-# ifndef NDEBUG
- int ret =
-# endif
- unlink(name.c_str());
-#endif
- assert(ret != -1);
-}
-
-void
usage(const char* appName)
{
- cerr << "Usage: " << appName << " [options] [lockfile]\n";
+ cerr << "Usage: " << appName << " [options]\n";
cerr <<
"Options:\n"
"-h, --help Show this message.\n"
@@ -96,7 +74,6 @@ usage(const char* appName)
int
run(int argc, char* argv[], const CommunicatorPtr& communicator)
{
- string lockfile = "subscriber.lock";
bool batch = false;
int idx = 1;
@@ -123,11 +100,6 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
usage(argv[0]);
return EXIT_FAILURE;
}
- else
- {
- lockfile = argv[idx];
- ++idx;
- }
}
PropertiesPtr properties = communicator->getProperties();
@@ -187,16 +159,12 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
fed2->subscribe(qos, objFed2);
fed3->subscribe(qos, objFed3);
- createLock(lockfile);
-
communicator->waitForShutdown();
fed1->unsubscribe(objFed1);
fed2->unsubscribe(objFed2);
fed3->unsubscribe(objFed3);
- deleteLock(lockfile);
-
return EXIT_SUCCESS;
}
diff --git a/cpp/test/IceStorm/federation/run.py b/cpp/test/IceStorm/federation/run.py
index e08ea617797..eb8998394b5 100755
--- a/cpp/test/IceStorm/federation/run.py
+++ b/cpp/test/IceStorm/federation/run.py
@@ -51,60 +51,25 @@ def doTest(batch):
name = "subscriber"
batchOptions = ""
- #
- # Start the subscriber. The subscriber creates a lock-file which
- # is used later to ensure that the subscriber actually goes away.
- #
- subscriberLockFile = os.path.join(testdir, 'subscriber.lock')
- try:
- os.remove(subscriberLockFile)
- except:
- pass # Ignore errors if the lockfile is not present
-
- print "starting " + name + "...",
- command = subscriber + batchOptions + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile + " 2>&1"
- subscriberPipe = os.popen(command)
+ command = subscriber + batchOptions + TestUtil.clientServerOptions + iceStormReference
+ if TestUtil.debug:
+ print "(" + command + ")",
+ subscriberPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(subscriberPipe)
- TestUtil.getAdapterReady(subscriberPipe, False)
- print "ok"
-
- print "checking " + name + " lockfile creation...",
- lockCount = 0
- while not os.path.isfile(subscriberLockFile):
- if lockCount > 10:
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
- time.sleep(1)
- lockCount = lockCount + 1
- print "ok"
+ TestUtil.getAdapterReady(subscriberPipe)
#
# Start the publisher. This should publish events which eventually
# causes subscriber to terminate.
#
- print "starting publisher...",
- command = publisher + TestUtil.clientOptions + iceStormReference + " 2>&1"
- publisherPipe = os.popen(command)
- print "ok"
+ command = publisher + TestUtil.clientOptions + iceStormReference
+ if TestUtil.debug:
+ print "(" + command + ")",
+ publisherPipe = os.popen(command + " 2>&1")
TestUtil.printOutputFromPipe(publisherPipe)
- #
- # Verify that the subscriber has terminated.
- #
- print "checking " + name + " lockfile removal...",
- lockCount = 0
- while os.path.isfile(subscriberLockFile):
- if lockCount > 60:
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
- time.sleep(1)
- lockCount = lockCount + 1
- print "ok"
-
- subscriberStatus = TestUtil.closePipe(subscriberPipe)
+ subscriberStatus = TestUtil.specificServerStatus(subscriberPipe, 30)
publisherStatus = TestUtil.closePipe(publisherPipe)
return subscriberStatus or publisherStatus
@@ -114,30 +79,20 @@ TestUtil.cleanDbDir(dbHome)
iceStormDBEnv=" --Freeze.DbEnv.IceStorm.DbHome=" + dbHome
print "starting icestorm service...",
-command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv + " 2>&1"
-iceBoxPipe = os.popen(command)
+command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv
+if TestUtil.debug:
+ print "(" + command + ")",
+iceBoxPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(iceBoxPipe)
TestUtil.waitServiceReady(iceBoxPipe, "IceStorm")
print "ok"
-print "creating topics...",
-command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "create fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
-iceStormAdminStatus = TestUtil.closePipe(iceStormAdminPipe)
-if iceStormAdminStatus:
- TestUtil.killServers()
- sys.exit(1)
-print "ok"
-
-print "linking topics...",
-command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed1 fed2 10"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
-iceStormAdminStatus = TestUtil.closePipe(iceStormAdminPipe)
-if iceStormAdminStatus:
- TestUtil.killServers()
- sys.exit(1)
-command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "link fed2 fed3 5"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+print "setting up topics...",
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + \
+ r' -e "create fed1 fed2 fed3; link fed1 fed2 10; link fed2 fed3 5"'
+if TestUtil.debug:
+ print "(" + command + ")",
+iceStormAdminPipe = os.popen(command + " 2>&1")
iceStormAdminStatus = TestUtil.closePipe(iceStormAdminPipe)
if iceStormAdminStatus:
TestUtil.killServers()
@@ -147,19 +102,27 @@ print "ok"
#
# Test oneway subscribers.
#
+print "testing oneway subscribers...",
+sys.stdout.flush()
onewayStatus = doTest(0)
+print "ok"
#
# Test batch oneway subscribers.
#
+print "testing batch subscribers...",
+sys.stdout.flush()
batchStatus = doTest(1)
+print "ok"
#
# Destroy the topics.
#
print "destroying topics...",
-command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1 fed2 fed3"' + " 2>&1"
-iceStormAdminPipe = os.popen(command)
+command = iceStormAdmin + TestUtil.clientOptions + iceStormReference + r' -e "destroy fed1 fed2 fed3"'
+if TestUtil.debug:
+ print "(" + command + ")",
+iceStormAdminPipe = os.popen(command + " 2>&1")
iceStormAdminStatus = TestUtil.closePipe(iceStormAdminPipe)
if iceStormAdminStatus:
TestUtil.killServers()
@@ -170,8 +133,10 @@ print "ok"
# Shutdown icestorm.
#
print "shutting down icestorm service...",
-command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown' + " 2>&1"
-iceBoxAdminPipe = os.popen(command)
+command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown'
+if TestUtil.debug:
+ print "(" + command + ")",
+iceBoxAdminPipe = os.popen(command + " 2>&1")
iceBoxAdminStatus = TestUtil.closePipe(iceBoxAdminPipe)
if iceBoxAdminStatus:
TestUtil.killServers()
diff --git a/cpp/test/IceStorm/federation2/Subscriber.cpp b/cpp/test/IceStorm/federation2/Subscriber.cpp
index 4fc219ddfee..0cbc16d779b 100644
--- a/cpp/test/IceStorm/federation2/Subscriber.cpp
+++ b/cpp/test/IceStorm/federation2/Subscriber.cpp
@@ -61,31 +61,9 @@ int EventI::_count = 0;
IceUtil::StaticMutex EventI::_countMutex = ICE_STATIC_MUTEX_INITIALIZER;
void
-createLock(const string& name)
-{
- int fd = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0777);
- assert(fd != -1);
- close(fd);
-}
-
-void
-deleteLock(const string& name)
-{
-#ifdef _WIN32
- int ret = _unlink(name.c_str());
-#else
-# ifndef NDEBUG
- int ret =
-# endif
- unlink(name.c_str());
-#endif
- assert(ret != -1);
-}
-
-void
usage(const char* appName)
{
- cerr << "Usage: " << appName << " [options] [lockfile]\n";
+ cerr << "Usage: " << appName << " [options]\n";
cerr <<
"Options:\n"
"-h, --help Show this message.\n"
@@ -96,7 +74,6 @@ usage(const char* appName)
int
run(int argc, char* argv[], const CommunicatorPtr& communicator)
{
- string lockfile = "subscriber.lock";
bool batch = false;
int idx = 1;
@@ -123,11 +100,6 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
usage(argv[0]);
return EXIT_FAILURE;
}
- else
- {
- lockfile = argv[idx];
- ++idx;
- }
}
PropertiesPtr properties = communicator->getProperties();
@@ -177,14 +149,10 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
fed1->subscribe(qos, objFed1);
- createLock(lockfile);
-
communicator->waitForShutdown();
fed1->unsubscribe(objFed1);
- deleteLock(lockfile);
-
return EXIT_SUCCESS;
}
diff --git a/cpp/test/IceStorm/federation2/run.py b/cpp/test/IceStorm/federation2/run.py
index e2b6472147b..2d5ba98bebb 100755
--- a/cpp/test/IceStorm/federation2/run.py
+++ b/cpp/test/IceStorm/federation2/run.py
@@ -72,65 +72,25 @@ def doTest(batch, subscriberRef = None):
if subscriberRef == None:
subscriberRef = iceStormReference2
- #
- # Start the subscriber. The subscriber creates a lock-file which
- # is used later to ensure that the subscriber actually goes away.
- #
- subscriberLockFile = os.path.join(testdir, 'subscriber.lock')
- try:
- os.remove(subscriberLockFile)
- except:
- pass # Ignore errors if the lockfile is not present
-
- print "starting " + name + "...",
- command = subscriber + batchOptions + TestUtil.clientServerOptions + subscriberRef + r' ' + \
- subscriberLockFile
+ command = subscriber + batchOptions + TestUtil.clientServerOptions + subscriberRef
if TestUtil.debug:
print "(" + command + ")",
subscriberPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(subscriberPipe)
- TestUtil.getAdapterReady(subscriberPipe, False)
- print "ok"
-
- print "checking " + name + " lockfile creation...",
- lockCount = 0
- while not os.path.isfile(subscriberLockFile):
- if lockCount > 10:
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
- time.sleep(1)
- lockCount = lockCount + 1
- print "ok"
+ TestUtil.getAdapterReady(subscriberPipe)
#
# Start the publisher. This should publish events which eventually
# causes subscriber to terminate.
#
- print "starting publisher...",
command = publisher + TestUtil.clientOptions + iceStormReference
if TestUtil.debug:
print "(" + command + ")",
publisherPipe = os.popen(command + " 2>&1")
- print "ok"
TestUtil.printOutputFromPipe(publisherPipe)
- #
- # Verify that the subscriber has terminated.
- #
- print "checking " + name + " lockfile removal...",
- lockCount = 0
- while os.path.isfile(subscriberLockFile):
- if lockCount > 10:
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
- time.sleep(1)
- lockCount = lockCount + 1
- print "ok"
-
- subscriberStatus = TestUtil.closePipe(subscriberPipe)
+ subscriberStatus = TestUtil.specificServerStatus(subscriberPipe, 30)
publisherStatus = TestUtil.closePipe(publisherPipe)
return subscriberStatus or publisherStatus
@@ -143,7 +103,6 @@ def startServers():
global iceStormService2
global iceStormDBEnv
global iceStormDBEnv2
- print "starting icestorm services...",
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv
if TestUtil.debug:
print "(" + command + ")",
@@ -156,7 +115,6 @@ def startServers():
iceBoxPipe2 = os.popen(command + " 2>&1")
TestUtil.getServerPid(iceBoxPipe2)
TestUtil.waitServiceReady(iceBoxPipe2, "IceStorm")
- print "ok"
return iceBoxPipe, iceBoxPipe2
@@ -165,7 +123,6 @@ def stopServers(p1, p2 = None):
global iceBoxAdmin
global iceBoxEndpoints
global iceBoxEndpoints2
- print "shutting down icestorm services...",
command = iceBoxAdmin + TestUtil.clientOptions + iceBoxEndpoints + r' shutdown'
if TestUtil.debug:
print "(" + command + ")",
@@ -183,7 +140,6 @@ def stopServers(p1, p2 = None):
if status or TestUtil.specificServerStatus(p2):
TestUtil.killServers()
sys.exit(1)
- print "ok"
dbHome = os.path.join(testdir, "db")
TestUtil.cleanDbDir(dbHome)
@@ -199,9 +155,13 @@ iceStormDBEnv2=" --Freeze.DbEnv.IceStorm.DbHome=" + dbHome2
# create a cross service link fed1->fed2 and ensure the events are
# published between them correctly.
#
+print "starting IceStorm services...",
+sys.stdout.flush()
iceBoxPipe1, iceBoxPipe2 = startServers()
+print "ok"
print "setting up the topics...",
+sys.stdout.flush()
command = iceStormAdmin + TestUtil.clientOptions + adminIceStormReference + \
r' -e "create TestIceStorm1/fed1 TestIceStorm2/fed1; link TestIceStorm1/fed1 TestIceStorm2/fed1"'
if TestUtil.debug:
@@ -216,12 +176,18 @@ print "ok"
#
# Test oneway subscribers.
#
+print "testing federation with oneway subscribers...",
+sys.stdout.flush()
onewayStatus = doTest(0)
+print "ok"
#
# Test batch oneway subscribers.
#
+print "testing federation with batch subscribers...",
+sys.stdout.flush()
batchStatus = doTest(1)
+print "ok"
if onewayStatus or batchStatus:
TestUtil.killServers()
@@ -233,6 +199,8 @@ if onewayStatus or batchStatus:
# Stop and restart the service and repeat the test. This ensures that
# the database is correct.
#
+print "restarting services to ensure that the database content is preserved...",
+sys.stdout.flush()
#
# Shutdown icestorm.
@@ -240,16 +208,23 @@ if onewayStatus or batchStatus:
stopServers(iceBoxPipe1, iceBoxPipe2)
iceBoxPipe1, iceBoxPipe2 = startServers()
+print "ok"
#
# Test oneway subscribers.
#
+print "retesting federation with oneway subscribers... ",
+sys.stdout.flush()
onewayStatus = doTest(0)
+print "ok"
#
# Test batch oneway subscribers.
#
+print "retesting federation with batch subscribers... ",
+sys.stdout.flush()
batchStatus = doTest(1)
+print "ok"
if onewayStatus or batchStatus:
TestUtil.killServers()
@@ -322,7 +297,8 @@ class ExpectorThread(threading.Thread):
# Then re-start the linked downstream server and publish the events.
# Ensure they are received by the linked server.
#
-print "starting first icestorm server...",
+print "restarting only one IceStorm server...",
+sys.stdout.flush()
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints + iceStormService + iceStormDBEnv
if TestUtil.debug:
print "(" + command + ")",
@@ -340,13 +316,17 @@ print "ok"
#
# Test oneway subscribers.
#
+print "testing that the federation link reports an error...",
+sys.stdout.flush()
onewayStatus = doTest(0, iceStormReference)
+print "ok"
if onewayStatus or expectorThread.matches(index) != 1:
TestUtil.killServers()
sys.exit(1)
-print "starting second icestorm server...",
+print "starting downstream icestorm server...",
+sys.stdout.flush()
command = iceBox + TestUtil.clientServerOptions + iceBoxEndpoints2 + iceStormService2 + iceStormDBEnv2
if TestUtil.debug:
print "(" + command + ")",
@@ -363,7 +343,10 @@ time.sleep(3)
#
# Test oneway subscribers.
#
+print "testing link is reestablished...",
+sys.stdout.flush()
onewayStatus = doTest(0)
+print "ok"
if onewayStatus or expectorThread.matches(index) != 1:
TestUtil.killServers()
@@ -375,13 +358,19 @@ if onewayStatus or expectorThread.matches(index) != 1:
# Trash the TestIceStorm2 database. Then restart the servers and
# verify that the link is removed.
#
+print "destroying the downstream IceStorm service database...",
+sys.stdout.flush()
stopServers(iceBoxPipe1, iceBoxPipe2)
TestUtil.cleanDbDir(dbHome2)
+print "ok"
+print "restarting IceStorm servers...",
+sys.stdout.flush()
iceBoxPipe1, iceBoxPipe2 = startServers()
+print "ok"
-print "checking link...",
+print "checking link still exists...",
command = iceStormAdmin + TestUtil.clientOptions + adminIceStormReference + r' -e "list TestIceStorm1 fed1"'
if TestUtil.debug:
print "(" + command + ")",
@@ -397,13 +386,13 @@ if iceStormAdminStatus:
sys.exit(1)
print "ok"
-print "starting publisher...",
+print "publishing some events...",
+sys.stdout.flush()
publisher = os.path.join(toplevel, "test", "IceStorm", "federation2", "publisher")
command = publisher + TestUtil.clientOptions + iceStormReference
if TestUtil.debug:
print "(" + command + ")",
publisherPipe = os.popen(command + " 2>&1")
-print "ok"
TestUtil.printOutputFromPipe(publisherPipe)
@@ -416,7 +405,6 @@ if publisherStatus:
# out in one batch to the linked subscriber which means that the link
# is not reaped until the next batch is sent.
time.sleep(1)
-print "starting publisher...",
publisher = os.path.join(toplevel, "test", "IceStorm", "federation2", "publisher")
command = publisher + TestUtil.clientOptions + iceStormReference
if TestUtil.debug:
@@ -432,7 +420,8 @@ if publisherStatus:
sys.exit(1)
# Verify that the link has disappeared.
-print "checking link...",
+print "verifying that the link has been destroyed...",
+sys.stdout.flush()
command = iceStormAdmin + TestUtil.clientOptions + adminIceStormReference + \
r' -e "list TestIceStorm1 fed1"' + " 2>&1"
if TestUtil.debug:
@@ -470,9 +459,12 @@ print "ok"
#
# Shutdown icestorm.
#
+print "shutting down icestorm services...",
+sys.stdout.flush()
stopServers(iceBoxPipe1, iceBoxPipe2)
if TestUtil.serverStatus():
TestUtil.killServers()
sys.exit(1)
+print "ok"
sys.exit(0)
diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp
index 4234b2c3ab3..2118f49b2b0 100644
--- a/cpp/test/IceStorm/single/Subscriber.cpp
+++ b/cpp/test/IceStorm/single/Subscriber.cpp
@@ -81,40 +81,9 @@ private:
};
typedef IceUtil::Handle<SingleI> SingleIPtr;
-void
-createLock(const string& name)
-{
- int fd = open(name.c_str(), O_CREAT | O_WRONLY | O_EXCL, 0777);
- assert(fd != -1);
- close(fd);
-}
-
-void
-deleteLock(const string& name)
-{
-#ifdef _WIN32
- int ret = _unlink(name.c_str());
-#else
-# ifndef NDEBUG
- int ret =
-# endif
- unlink(name.c_str());
-#endif
- assert(ret != -1);
-}
-
int
run(int argc, char* argv[], const CommunicatorPtr& communicator)
{
- string lockfile = "subscriber.lock";
-
- if(argc != 1)
- {
- lockfile = argv[1];
- }
-
- createLock(lockfile);
-
PropertiesPtr properties = communicator->getProperties();
const char* managerProxyProperty = "IceStorm.TopicManager.Proxy";
string managerProxy = properties->getProperty(managerProxyProperty);
@@ -185,8 +154,6 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator)
(*p)->waitForEvents();
}
- deleteLock(lockfile);
-
return EXIT_SUCCESS;
}
diff --git a/cpp/test/IceStorm/single/run.py b/cpp/test/IceStorm/single/run.py
index 85f95f3881d..3c2f43442c3 100755
--- a/cpp/test/IceStorm/single/run.py
+++ b/cpp/test/IceStorm/single/run.py
@@ -64,30 +64,13 @@ print "ok"
publisher = os.path.join(testdir, "publisher")
subscriber = os.path.join(testdir, "subscriber")
-#
-# Start the subscriber. The subscriber creates a lock-file which
-# is used later to ensure that the subscriber actually goes away.
-#
-subscriberLockFile = os.path.join(testdir, 'subscriber.lock')
-try:
- os.remove(subscriberLockFile)
-except:
- pass # Ignore errors if the lockfile is not present
-
print "starting subscriber...",
-command = subscriber + TestUtil.clientServerOptions + iceStormReference + r' ' + subscriberLockFile
+command = subscriber + TestUtil.clientServerOptions + iceStormReference
if TestUtil.debug:
print "(" + command + ")"
subscriberPipe = os.popen(command + " 2>&1")
TestUtil.getServerPid(subscriberPipe)
-TestUtil.getAdapterReady(subscriberPipe, False)
-print "ok"
-
-print "checking subscriber lockfile creation...",
-if not os.path.isfile(subscriberLockFile):
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
+TestUtil.getAdapterReady(subscriberPipe)
print "ok"
#
@@ -101,21 +84,8 @@ if TestUtil.debug:
publisherPipe = os.popen(command + " 2>&1")
print "ok"
-TestUtil.printOutputFromPipe(subscriberPipe)
-
-#
-# Verify that the subscriber has terminated.
-#
-print "checking subscriber lockfile removal...",
-lockCount = 0
-while os.path.isfile(subscriberLockFile):
- if lockCount > 10:
- print "failed!"
- TestUtil.killServers()
- sys.exit(1)
- time.sleep(1)
- lockCount = lockCount + 1
-print "ok"
+subscriberStatus = TestUtil.specificServerStatus(subscriberPipe, 30)
+publisherStatus = TestUtil.closePipe(publisherPipe)
#
# Destroy the topic.
@@ -145,9 +115,6 @@ if iceBoxAdminStatus:
sys.exit(1)
print "ok"
-subscriberStatus = TestUtil.closePipe(subscriberPipe)
-publisherStatus = TestUtil.closePipe(publisherPipe)
-
if TestUtil.serverStatus() or subscriberStatus or publisherStatus:
TestUtil.killServers()
sys.exit(1)
diff --git a/cpp/test/IceStorm/stress/Subscriber.cpp b/cpp/test/IceStorm/stress/Subscriber.cpp
index dba8231d209..3bf45842cec 100644
--- a/cpp/test/IceStorm/stress/Subscriber.cpp
+++ b/cpp/test/IceStorm/stress/Subscriber.cpp
@@ -177,12 +177,14 @@ int ErraticEventI::_remaining = 0;
void
usage(const char* appName)
{
- cerr << "Usage: " << appName << " [options] [lockfile]\n";
- // XXX:
+ cerr << "Usage: " << appName << " [options]\n";
cerr <<
"Options:\n"
- "-h, --help Show this message.\n"
- "-b Use batch reliability.\n"
+ "-h, --help Show this message.\n"
+ "--events <e> Terminate after <e> are received.\n"
+ "--qos <key>,<value><e> Subscribe with this QoS.\n"
+ "--erratic <n> Add <n> erratic subscribers.\n"
+ "--slow The subscribers sleeps 3 seconds after each event.\n"
;
}