summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-11-09 21:45:06 +0000
committerAlan Conway <aconway@apache.org>2012-11-09 21:45:06 +0000
commit8ff1f8c1a0eb2cee06402544f6ccac6e57b1bcd2 (patch)
treeda906ba0e6424a556ef31b4a7e928304da116d68 /qpid/cpp/src/tests
parent464ae39a9a52becfb9b22fa2d5efc8624617bffa (diff)
downloadqpid-python-8ff1f8c1a0eb2cee06402544f6ccac6e57b1bcd2.tar.gz
Bug 874118 - HA Deadlock in backup broker after disconnecting from primary.
The backup broker was running ExchangeRegistry::for_each to clean up connections, but this holds the ExchangeRegistry lock and hence the deadlock. Now we copy a list of exchanges with for_each and work on it without the lock. The issue showed up for 0 timeouts only because the queue schedules non-0 timeouts to a separate timer thread. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1407661 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index 3b69e3de33..a7f276becb 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/cpp/src/tests/ha_tests.py
@@ -753,11 +753,16 @@ acl deny all all
def test_auto_delete_timeout(self):
cluster = HaCluster(self, 2)
- s = cluster[0].connect().session().receiver("q;{create:always,node:{x-declare:{auto-delete:True,arguments:{'qpid.auto_delete_timeout':1}}}}")
- cluster[1].wait_queue("q")
+ # Test timeout
+ r1 = cluster[0].connect().session().receiver("q1;{create:always,node:{x-declare:{auto-delete:True,arguments:{'qpid.auto_delete_timeout':1}}}}")
+ # Test special case of timeout = 0
+ r0 = cluster[0].connect().session().receiver("q0;{create:always,node:{x-declare:{auto-delete:True,arguments:{'qpid.auto_delete_timeout':0}}}}")
+ cluster[1].wait_queue("q0")
+ cluster[1].wait_queue("q1")
cluster[0].kill()
- cluster[1].wait_queue("q") # Not timed out yet
- cluster[1].wait_no_queue("q") # Wait for timeout
+ cluster[1].wait_queue("q1") # Not timed out yet
+ cluster[1].wait_no_queue("q1", timeout=2) # Wait for timeout
+ cluster[1].wait_no_queue("q0", timeout=2)
def test_alt_exchange_dup(self):
"""QPID-4349: if a queue has an alterante exchange and is deleted the
@@ -817,10 +822,13 @@ acl deny all all
if class_name(m) == 'queueDeclare' and q_name(m) == qname: found = True
except Empty: pass
assert(found)
- verify_qmf_events("q1")
- cluster[1].wait_status("ready")
- cluster.kill(0)
- verify_qmf_events("q2")
+ try:
+ verify_qmf_events("q1")
+ cluster[1].wait_status("ready")
+ l = LogLevel(ERROR) # Hide expected WARNING log messages from failover.
+ cluster.kill(0)
+ verify_qmf_events("q2")
+ finally: l.restore()
def fairshare(msgs, limit, levels):
"""