summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/QueuePolicyTest.cpp1
-rwxr-xr-xcpp/src/tests/cluster_tests.py2
-rw-r--r--cpp/src/tests/queue_flow_limit_tests.py21
3 files changed, 23 insertions, 1 deletions
diff --git a/cpp/src/tests/QueuePolicyTest.cpp b/cpp/src/tests/QueuePolicyTest.cpp
index f9c058c771..5455105078 100644
--- a/cpp/src/tests/QueuePolicyTest.cpp
+++ b/cpp/src/tests/QueuePolicyTest.cpp
@@ -386,6 +386,7 @@ QPID_AUTO_TEST_CASE(testCapacityConversion)
{
FieldTable args;
args.setString("qpid.max_count", "5");
+ args.setString("qpid.flow_stop_count", "0");
ProxySessionFixture f;
std::string q("q");
diff --git a/cpp/src/tests/cluster_tests.py b/cpp/src/tests/cluster_tests.py
index 727934ae26..85ace1008a 100755
--- a/cpp/src/tests/cluster_tests.py
+++ b/cpp/src/tests/cluster_tests.py
@@ -567,7 +567,7 @@ acl allow all all
s0 = c0.session()
# Declare multiple queues bound to same key on amq.topic
def declare(q,max=0):
- if max: declare = 'x-declare:{arguments:{"qpid.max_count":%d}}'%max
+ if max: declare = 'x-declare:{arguments:{"qpid.max_count":%d, "qpid.flow_stop_count":0}}'%max
else: declare = 'x-declare:{}'
bind='x-bindings:[{queue:%s,key:key,exchange:"amq.topic"}]'%(q)
s0.sender("%s;{create:always,node:{%s,%s}}" % (q,declare,bind))
diff --git a/cpp/src/tests/queue_flow_limit_tests.py b/cpp/src/tests/queue_flow_limit_tests.py
index 6639cdc393..51f91647fb 100644
--- a/cpp/src/tests/queue_flow_limit_tests.py
+++ b/cpp/src/tests/queue_flow_limit_tests.py
@@ -129,6 +129,27 @@ class QueueFlowLimitTests(TestBase010):
self.assertEqual(i.name, "test01")
self._delete_queue("test01")
+ # now verify that the default ratios are applied if max sizing is specified:
+ command = tool + \
+ " --broker-addr=%s:%s " % (self.broker.host, self.broker.port) \
+ + "add queue test02 --max-queue-count=10000 --max-queue-size=1000000"
+ cmd = popen(command)
+ rc = cmd.close()
+ self.assertEqual(rc, None)
+
+ # now verify the settings
+ qs = self.qmf.getObjects(_class="queue")
+ for i in qs:
+ if i.name == "test02":
+ ## @todo KAG: can't get the flow size from qmf! Arrgh!
+ # no way to verify...
+ #self.assertEqual(i.arguments.get("qpid.flow_resume_count"), 55)
+ #self.assertEqual(i.arguments.get("qpid.flow_resume_count"), 55)
+ self.failIf(i.flowStopped)
+ break;
+ self.assertEqual(i.name, "test02")
+ self._delete_queue("test02")
+
def test_flow_count(self):
""" Create a queue with count-based flow limit. Spawn several