diff options
author | Alan Conway <aconway@apache.org> | 2012-12-14 15:30:40 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-12-14 15:30:40 +0000 |
commit | 720214353e61cc171aadcc3e18c4edad9facfa9c (patch) | |
tree | 595494431ffe571a6880a5b11b806f91e533813d /qpid/cpp/src/tests/ha_test.py | |
parent | 7ace74f35ce8d8b4788d7aa1545a541de04ad451 (diff) | |
download | qpid-python-720214353e61cc171aadcc3e18c4edad9facfa9c.tar.gz |
QPID-4506: Qpid HA's '--ha-public-url' option duplicates the '--known-hosts-url' option but cannot be disabled
Reverts the previous commit and simplifies the semantics of setting
--ha-public-url and --ha-brokers-url. There is no longer any over-riding or
implicit updating of values. That means you must set --ha-public-url as well as
--ha-brokers-url, it will not be defaulted. Likewise if you *dont* set
ha-public-url, it will remain empty, which is the use case in this bug.
The defaulting was adding complexity without adding much value.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1421934 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ha_test.py')
-rwxr-xr-x | qpid/cpp/src/tests/ha_test.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py index d7885d9622..4efbfdba3d 100755 --- a/qpid/cpp/src/tests/ha_test.py +++ b/qpid/cpp/src/tests/ha_test.py @@ -100,7 +100,7 @@ class HaBroker(Broker): self.qpid_ha_script.main_except(["", "-b", url]+args) def promote(self): self.ready(); self.qpid_ha(["promote"]) - def set_client_url(self, url): self.qpid_ha(["set", "--public-url", url]) + def set_public_url(self, url): self.qpid_ha(["set", "--public-url", url]) def set_brokers_url(self, url): self.qpid_ha(["set", "--brokers-url", url]) def replicate(self, from_broker, queue): self.qpid_ha(["replicate", from_broker, queue]) @@ -113,10 +113,12 @@ class HaBroker(Broker): self._agent = QmfAgent(self.host_port()) return self._agent - def ha_status(self): + def qmf(self): hb = self.agent().getHaBroker() hb.update() - return hb.status + return hb + + def ha_status(self): return self.qmf().status def wait_status(self, status): def try_get_status(): @@ -234,7 +236,9 @@ class HaCluster(object): def update_urls(self): self.url = ",".join([b.host_port() for b in self]) if len(self) > 1: # No failover addresses on a 1 cluster. - for b in self: b.set_brokers_url(self.url) + for b in self: + b.set_brokers_url(self.url) + b.set_public_url(self.url) def connect(self, i): """Connect with reconnect_urls""" |