diff options
| author | Alan Conway <aconway@apache.org> | 2014-01-24 21:54:59 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-01-24 21:54:59 +0000 |
| commit | 7d3e48dc2acf7ca77f044ac34f2063c5a0bf0692 (patch) | |
| tree | 41f4d08b748da3f30afed78dd902a99b5b6d436b /qpid/cpp/src/tests/ha_tests.py | |
| parent | ea2a45285fb83554df1364428075cda763644749 (diff) | |
| download | qpid-python-7d3e48dc2acf7ca77f044ac34f2063c5a0bf0692.tar.gz | |
QPID-5513: HA backup fails if number of replicated queues exceeds number of channels.
The problem:
- create cluster of 2 brokers.
- create more than 32768 queues (exceeds number of channels on a connection)
- backup exits with critical error but
- client creating queues receives no error, primary continues with unreplicated queue.
The solution: Primary raises an error to the client if it attempts to create
queues in excess of the channel limit. The queue is not created on primary
or backup, primary and backup continue as normal.
In addition: raised the channel limit from 32k to 64k. There was no reason for
the smaller limit. See discussion: http://qpid.2158936.n2.nabble.com/CHANNEL-MAX-and-CHANNEL-HIGH-BIT-question-tp7603121p7603138.html
New unit test to reproduce the issue, must create > 64k queues.
Other minor improvements:
- brokertest framework doesn't override --log options in the arguments.
- increased default heartbeat in test framework for tests that have busy brokers.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1561206 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ha_tests.py')
| -rwxr-xr-x | qpid/cpp/src/tests/ha_tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index b8644ab0fa..abc62b643e 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -22,6 +22,7 @@ import os, signal, sys, time, imp, re, subprocess, glob, random, logging, shutil import traceback from qpid.messaging import Message, SessionError, NotFound, ConnectionError, ReceiverError, Connection, Timeout, Disposition, REJECTED, Empty, ServerError from qpid.datatypes import uuid4, UUID +from qpid.harness import Skipped from brokertest import * from ha_test import * from threading import Thread, Lock, Condition @@ -1078,6 +1079,18 @@ class LongTests(HaBrokerTest): finally: for t in threads: t.stopped = True; t.join() + def test_max_queues(self): + """Verify that we behave properly if we try to exceed the max number + of replicated queues - currently limited by the max number of channels + in the replication link""" + # This test is very slow (3 mins), skip it unless duration() > 1 minute. + if self.duration() < 60: return + # This test is written in C++ for speed, it takes a long time + # to create 64k queues in python. See ha_test_max_queues.cpp. + cluster = HaCluster(self, 2) + test = self.popen(["ha_test_max_queues", cluster[0].host_port()]) + self.assertEqual(test.wait(), 0) + class RecoveryTests(HaBrokerTest): """Tests for recovery after a failure.""" |
