summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_tests.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-11-17 18:09:21 +0000
committerAlan Conway <aconway@apache.org>2009-11-17 18:09:21 +0000
commit1f91e22255a62a408d5fc82e0d0ed8c6260a49f7 (patch)
tree6a5646b695f6aba7915f017d1d6b06e17dd2ee95 /qpid/cpp/src/tests/cluster_tests.py
parent20e76d9894129f94f58a6b4794f64dbb4ddf8820 (diff)
downloadqpid-python-1f91e22255a62a408d5fc82e0d0ed8c6260a49f7.tar.gz
Integrated InitialStatusMap into cluster code.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@881423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster_tests.py')
-rwxr-xr-xqpid/cpp/src/tests/cluster_tests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py
index 637b0aea0f..3ded6c103e 100755
--- a/qpid/cpp/src/tests/cluster_tests.py
+++ b/qpid/cpp/src/tests/cluster_tests.py
@@ -29,6 +29,11 @@ from threading import Thread
class ClusterTests(BrokerTest):
"""Cluster tests with support for testing with a store plugin."""
+ def duration(self):
+ d = self.config.defines.get("DURATION")
+ if d: return float(d)*60
+ else: return 3
+
def test_message_replication(self):
"""Test basic cluster message replication."""
# Start a cluster, send some messages to member 0.
@@ -66,11 +71,10 @@ class ClusterTests(BrokerTest):
sender = NumberedSender(cluster[2])
sender.start()
- # Kill original brokers, start new ones.
- endtime = time.time() + (int(self.config.defines.get("DURATION") or 3))
+ # Kill original brokers, start new ones for the duration.
+ endtime = time.time() + self.duration()
i = 0
while time.time() < endtime:
- print time.time(), endtime
cluster[i].kill()
i += 1
b = cluster.start(expect=EXPECT_EXIT_FAIL)