summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-04-24 18:59:03 +0000
committerAlan Conway <aconway@apache.org>2014-04-24 18:59:03 +0000
commite8deb749c9669fedb1c073b7b20fbd3ce2b42f0f (patch)
tree5e8a68860afad6d7f85ea217b31ecaf64f877e0d /cpp/src/tests
parent0f77d69e46de18fdc3bf148434137f699df0b4ec (diff)
downloadqpid-python-e8deb749c9669fedb1c073b7b20fbd3ce2b42f0f.tar.gz
NO-JIRA: HA minor cleanup of qpid-ha tool
- Remove some dead code. - Removed "set" command - not ready for production. All settings in qpidd.conf. - Removed related tests in ha_tests - Improved help on promote command. - Made option group for common broker connection options. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1589834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rwxr-xr-xcpp/src/tests/ha_test.py8
-rwxr-xr-xcpp/src/tests/ha_tests.py49
2 files changed, 0 insertions, 57 deletions
diff --git a/cpp/src/tests/ha_test.py b/cpp/src/tests/ha_test.py
index 132892cb2f..fe1894ecc8 100755
--- a/cpp/src/tests/ha_test.py
+++ b/cpp/src/tests/ha_test.py
@@ -177,8 +177,6 @@ acl allow all all
raise Exception("Error in qpid_ha -b %s %s: %s"%(url, args,e))
def promote(self): self.ready(); self.qpid_ha(["promote"])
- 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])
@property
def agent(self):
@@ -343,7 +341,6 @@ class HaCluster(object):
if i == len(self._ports): # Adding new broker after cluster init
self._ports.append(HaPort(self.test))
self._set_url()
- self._update_urls()
b = self._ha_broker(i, self.next_name())
self._brokers.append(b)
return b
@@ -351,11 +348,6 @@ class HaCluster(object):
def _set_url(self):
self.url = ",".join("127.0.0.1:%s"%(p.port) for p in self._ports)
- def _update_urls(self):
- for b in self:
- b.set_brokers_url(self.url)
- b.set_public_url(self.url)
-
def connect(self, i, **kwargs):
"""Connect with reconnect_urls"""
return self[i].connect(reconnect=True, reconnect_urls=self.url.split(","), **kwargs)
diff --git a/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py
index cddbd90756..e2ebf220cf 100755
--- a/cpp/src/tests/ha_tests.py
+++ b/cpp/src/tests/ha_tests.py
@@ -1222,55 +1222,6 @@ class RecoveryTests(HaBrokerTest):
s.sender("q;{create:always}").send("x")
self.assertEqual("x", s.receiver("q").fetch(0).content)
-class ConfigurationTests(HaBrokerTest):
- """Tests for configuration settings."""
-
- def test_client_broker_url(self):
- """Check that setting of broker and public URLs obeys correct defaulting
- and precedence"""
-
- def check(broker, brokers, public):
- qmf = broker.qmf()
- self.assertEqual(brokers, qmf.brokersUrl)
- self.assertEqual(public, qmf.publicUrl)
-
- def start(brokers, public, known=None):
- args=[]
- if brokers: args.append("--ha-brokers-url="+brokers)
- if public: args.append("--ha-public-url="+public)
- if known: args.append("--known-hosts-url="+known)
- return HaBroker(self, args=args)
-
- # Both set explictily, no defaulting
- b = start("foo:123", "bar:456")
- check(b, "amqp:tcp:foo:123", "amqp:tcp:bar:456")
- b.set_brokers_url("foo:999")
- check(b, "amqp:tcp:foo:999", "amqp:tcp:bar:456")
- b.set_public_url("bar:999")
- check(b, "amqp:tcp:foo:999", "amqp:tcp:bar:999")
-
- # Allow "none" to mean "not set"
- b = start("none", "none")
- check(b, "", "")
-
- def test_failover_exchange(self):
- """Verify that the failover exchange correctly reports cluster membership"""
-
- def strip_url(url): return re.sub('amqp:|tcp:', '', url)
-
- def assert_url(m, url):
- urls = m.properties['amq.failover']
- self.assertEqual(1, len(urls))
- self.assertEqual(strip_url(urls[0]), url)
-
- cluster = HaCluster(self, 1, args=["--ha-public-url=foo:1234"])
- r = cluster[0].connect().session().receiver("amq.failover")
- assert_url(r.fetch(1), "foo:1234")
- cluster[0].set_public_url("bar:1234")
- assert_url(r.fetch(1), "bar:1234")
- cluster[0].set_brokers_url(cluster.url+",xxx:1234")
- self.assertRaises(qm.Empty, r.fetch, 0) # Not updated for brokers URL
-
class StoreTests(HaBrokerTest):
"""Test for HA with persistence."""