diff options
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/qpid/ha/Primary.cpp | 1 | ||||
| -rwxr-xr-x | qpid/cpp/src/tests/ha_tests.py | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/ha/Primary.cpp b/qpid/cpp/src/qpid/ha/Primary.cpp index b437190004..b29a550559 100644 --- a/qpid/cpp/src/qpid/ha/Primary.cpp +++ b/qpid/cpp/src/qpid/ha/Primary.cpp @@ -336,6 +336,7 @@ void Primary::opened(broker::Connection& connection) { } else { QPID_LOG(info, logPrefix << "Known backup reconnection: " << info); i->second->setConnection(&connection); + backup = i->second; } if (info.getStatus() == JOINING) { info.setStatus(CATCHUP); 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) |
