diff options
| author | Alan Conway <aconway@apache.org> | 2014-04-07 15:39:19 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-04-07 15:39:19 +0000 |
| commit | 8b0808b498dd5e3fe5e5d04e9e9c9492206036e2 (patch) | |
| tree | 67583f2b579d2af50ca57184c047b556c4103a46 /qpid/cpp/src/tests | |
| parent | 819e51ed19cb6f193d55a7894ca68c7131f00f07 (diff) | |
| download | qpid-python-8b0808b498dd5e3fe5e5d04e9e9c9492206036e2.tar.gz | |
QPID-5666: HA fails with resource-limit-exceeded: Exceeded replicated queue limit
This is regression introduced in r1561206: CommitDate: Fri Jan 24 21:54:59 2014 +0000
QPID-5513: HA backup fails if number of replicated queues exceeds number of channels.
Fixed by the current commit. PrimaryQueueLimits was not taking account of queues already
on the broker prior to promotion.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1585507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rwxr-xr-x | qpid/cpp/src/tests/ha_test.py | 4 | ||||
| -rwxr-xr-x | qpid/cpp/src/tests/ha_tests.py | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py index 748c8ef0c1..0f92f7dbcc 100755 --- a/qpid/cpp/src/tests/ha_test.py +++ b/qpid/cpp/src/tests/ha_test.py @@ -196,7 +196,7 @@ acl allow all all def ha_status(self): return self.qmf().status - def wait_status(self, status): + def wait_status(self, status, timeout=5): def try_get_status(): self._status = "<unknown>" # Ignore ConnectionError, the broker may not be up yet. @@ -204,7 +204,7 @@ acl allow all all self._status = self.ha_status() return self._status == status; except ConnectionError: return False - assert retry(try_get_status, timeout=5), "%s expected=%r, actual=%r"%( + assert retry(try_get_status, timeout=timeout), "%s expected=%r, actual=%r"%( self, status, self._status) def wait_queue(self, queue, timeout=1): diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index abc62b643e..f22e12a355 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -885,6 +885,19 @@ acl deny all all old_sess.exchange_declare(exchange='ex1', type='fanout') cluster[1].wait_backup("ex1") + def test_resource_limit_bug(self): + """QPID-5666 Regression test: Incorrect resource limit exception for queue creation.""" + cluster = HaCluster(self, 3) + qs = ["q%s"%i for i in xrange(10)] + s = cluster[0].connect().session() + s.sender("q;{create:always}").close() + cluster.kill(0) + cluster[1].promote() + cluster[1].wait_status("active") + s = cluster[1].connect().session() + s.receiver("q;{delete:always}").close() + s.sender("qq;{create:always}").close() + def fairshare(msgs, limit, levels): """ Generator to return prioritised messages in expected order for a given fairshare limit |
