summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-12-18 17:04:05 +0000
committerAlan Conway <aconway@apache.org>2013-12-18 17:04:05 +0000
commite4c01f2d3e221ba0f3dff689eea72837462a5909 (patch)
treecf86dac58445fdff104d4965f29b6d556bda9fa5 /qpid/cpp/src/tests
parenta71ccf9988f88111fb06fb095fa951bebba4c577 (diff)
downloadqpid-python-e4c01f2d3e221ba0f3dff689eea72837462a5909.tar.gz
QPID-5430: HA primary broker does not go active if there are no replicated queues.
Primary::opened was not checking if the primary was ready after a knonw backup reconnected, only when a replicated queue became ready. Thus if there were no replicated queues the primary never became ready. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1552025 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index 7db24810bf..7a292f177a 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/cpp/src/tests/ha_tests.py
@@ -253,8 +253,6 @@ class ReplicationTests(HaBrokerTest):
"""Verify that a backup broker fails over and recovers queue state"""
brokers = HaCluster(self, 3)
brokers[0].connect().session().sender("q;{create:always}").send("a")
- for b in brokers[1:]: b.assert_browse_backup("q", ["a"], msg=b)
- brokers[0].expect = EXPECT_EXIT_FAIL
brokers.kill(0)
brokers[1].connect().session().sender("q").send("b")
brokers[2].assert_browse_backup("q", ["a","b"])
@@ -263,6 +261,13 @@ class ReplicationTests(HaBrokerTest):
s.acknowledge()
brokers[2].assert_browse_backup("q", ["b"])
+ def test_empty_backup_failover(self):
+ """Verify that a new primary becomes active with no queues.
+ Regression test for QPID-5430"""
+ brokers = HaCluster(self, 3)
+ brokers.kill(0)
+ brokers[1].wait_status("active")
+
def test_qpid_config_replication(self):
"""Set up replication via qpid-config"""
brokers = HaCluster(self,2)