diff options
author | Kim van der Riet <kpvdr@apache.org> | 2009-05-26 18:22:48 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2009-05-26 18:22:48 +0000 |
commit | 20d3a8139c44dbd792a0974cfaf6fcc29d808b77 (patch) | |
tree | 8c5633d2ebd87519af13ede4fb9cb788095ba246 /qpid/cpp/src/tests/testlib.py | |
parent | 58a9619fe9fd83fcf806ea1ae716a0e0091a821d (diff) | |
download | qpid-python-20d3a8139c44dbd792a0974cfaf6fcc29d808b77.tar.gz |
Persistent cluster test added which checks for recovery of queue and messages after all nodes in a cluster are killed. Test does not run if no store is loaded.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@778827 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/testlib.py')
-rw-r--r-- | qpid/cpp/src/tests/testlib.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/testlib.py b/qpid/cpp/src/tests/testlib.py index 64b6396d5b..89967c2d44 100644 --- a/qpid/cpp/src/tests/testlib.py +++ b/qpid/cpp/src/tests/testlib.py @@ -188,7 +188,7 @@ class TestBaseCluster(TestBase): args += " --load-module %s" % self._storeLib self._clusterDict[clusterName][nodeNumber] = self.startBroker(args, logFile) - def createCluster(self, clusterName, numberNodes): + def createCluster(self, clusterName, numberNodes = 0): """Create a cluster containing an initial number of nodes""" self._clusterDict[clusterName] = {} for n in range(0, numberNodes): @@ -215,7 +215,9 @@ class TestBaseCluster(TestBase): def getClusterTupleList(self, clusterName): """Get list of (pid, port) tuples of all nodes in named cluster""" - return self._clusterDict[clusterName].values() + if clusterName in self._clusterDict: + return self._clusterDict[clusterName].values() + return [] def getNumClusterBrokers(self, clusterName): """Get total number of brokers in named cluster""" |