From 8bdb080ef1f4afb1727dc3fc5f2666bdfd982107 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 21 Jun 2013 15:02:08 +0000 Subject: QPID-4944: HA Sporadic failure in ha_tests: tes_failover_send_receive and test_expected_backup_timeout Very sporadic failures so difficult to verify the fix. - Simplified Membership, centralized status change, make it atomic. - Fix test bug in test_expected_backup_timeout: not waiting on final status check, race. - Remove out-of-date status info from log prefixes: Guard, ReplicatingSubscription git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1495466 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/ha_tests.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'qpid/cpp/src/tests/ha_tests.py') diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index 60e3444c45..368ac02506 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -1121,13 +1121,10 @@ class RecoveryTests(HaBrokerTest): but can still rejoin. """ cluster = HaCluster(self, 3, args=["--ha-backup-timeout=0.5"]); - cluster[0].wait_status("active") # Primary ready - for b in cluster[1:3]: b.wait_status("ready") # Backups ready for i in [0,1]: cluster.kill(i, False) - cluster[2].promote() # New primary, expected backup will 1 - cluster[2].wait_status("recovering") + cluster[2].promote() # New primary, expected backup will be 1 # Should not go active till the expected backup connects or times out. - self.assertEqual(cluster[2].ha_status(), "recovering") + cluster[2].wait_status("recovering") # Messages should be held till expected backup times out s = cluster[2].connect().session().sender("q;{create:always}") s.send("foo", sync=False) @@ -1135,7 +1132,7 @@ class RecoveryTests(HaBrokerTest): try: s.sync(timeout=.01); self.fail("Expected Timeout exception") except Timeout: pass s.sync(timeout=1) # And released after the timeout. - self.assertEqual(cluster[2].ha_status(), "active") + cluster[2].wait_status("active") def test_join_ready_cluster(self): """If we join a cluster where the primary is dead, the new primary is -- cgit v1.2.1