summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ha_test.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-08-30 14:43:06 +0000
committerAlan Conway <aconway@apache.org>2013-08-30 14:43:06 +0000
commit54cdb4dcada8cfeb23d756e4980e701ebb382c13 (patch)
treef9ce23279cffe298d1a3953489355214b827e530 /qpid/cpp/src/tests/ha_test.py
parent27d31ba355acfef3ec66c23e48864e88a358014b (diff)
downloadqpid-python-54cdb4dcada8cfeb23d756e4980e701ebb382c13.tar.gz
QPID-4327: HA clean up transaction artifacts at end of TX.
- Backups delete transactions on failover. - TxReplicator cancel subscriptions when transaction is finished. - TxReplicator rollback if destroyed prematurely. - Handle special case of no backups for a tx. - ha_tests.py: new and modified tests to cover the new functionality. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1518982 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ha_test.py')
-rwxr-xr-xqpid/cpp/src/tests/ha_test.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py
index ab63602655..4a7b538edd 100755
--- a/qpid/cpp/src/tests/ha_test.py
+++ b/qpid/cpp/src/tests/ha_test.py
@@ -48,9 +48,24 @@ class QmfAgent(object):
address, client_properties={"qpid.ha-admin":1}, **kwargs)
self._agent = BrokerAgent(self._connection)
- def get_queues(self):
+ def queues(self):
return [q.values['name'] for q in self._agent.getAllQueues()]
+ def repsub_queue(self, sub):
+ """If QMF subscription sub is a replicating subscription return
+ the name of the replicated queue, else return None"""
+ session_name = self.getSession(sub.sessionRef).name
+ m = re.search("qpid.ha-q:(.*)\.", session_name)
+ return m and m.group(1)
+
+ def repsub_queues(self):
+ """Return queue names for all replicating subscriptions"""
+ return filter(None, [self.repsub_queue(s) for s in self.getAllSubscriptions()])
+
+ def tx_queues(self):
+ """Return names of all tx-queues"""
+ return [q for q in self.queues() if q.startswith("qpid.ha-tx")]
+
def __getattr__(self, name):
a = getattr(self._agent, name)
return a