From 1f91e22255a62a408d5fc82e0d0ed8c6260a49f7 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 17 Nov 2009 18:09:21 +0000 Subject: Integrated InitialStatusMap into cluster code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@881423 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/cluster_tests.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'qpid/cpp/src/tests/cluster_tests.py') 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) -- cgit v1.2.1