Author: kpvdr
Date: 2011-02-21 10:25:27 -0500 (Mon, 21 Feb 2011)
New Revision: 4441
Modified:
store/trunk/cpp/tests/python_tests/flow_to_disk.py
Log:
Per Ken Giusti: Fix for flow control addition to broker (see qpid r.1072356). This patch
disables the flow control in the broker for the flow-to-disk tests, which rely on being
able to overflow small policy limits in the broker.
Modified: store/trunk/cpp/tests/python_tests/flow_to_disk.py
===================================================================
--- store/trunk/cpp/tests/python_tests/flow_to_disk.py 2011-02-15 19:23:14 UTC (rev 4440)
+++ store/trunk/cpp/tests/python_tests/flow_to_disk.py 2011-02-21 15:25:27 UTC (rev 4441)
@@ -29,7 +29,15 @@
class FlowToDisk(StoreTest):
"""Tests for async store flow-to-disk"""
-
+
+ def _broker_args(self):
+ """ Disable flow control so we can easily overflow a queue!
+ """
+ fc_off = ["--default-flow-stop-threshold", "0",
+ "--default-flow-resume-threshold", "0"]
+ return store_args() + fc_off;
+
+
@staticmethod
def _broker_name(queue_name, txn_produce, txn_consume):
"""Create a broker name based on the queue name and the
transaction parameters"""
@@ -66,7 +74,7 @@
expect = EXPECT_UNKNOWN
else:
expect = EXPECT_EXIT_OK
- broker = self.broker(store_args(), name=bname, expect=expect,
log_level="debug+")
+ broker = self.broker(self._broker_args(), name=bname, expect=expect,
log_level="debug+")
prod_session = broker.connect().session(transactional=txn_produce)
sender = prod_session.sender(self.snd_addr(queue_name, auto_create=True,
durable=True, ftd_count=max_count,
ftd_size=max_size, policy=policy))
@@ -102,7 +110,7 @@
else:
del msgs[:] # Transient messages will be discarded on recover
old_broker = broker # keep for log analysis
- broker = self.broker(store_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
+ broker = self.broker(self._broker_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
# Browse messages after recover
if browse:
@@ -476,7 +484,7 @@
fail_list = kwargs.get("fail_list")
bname = self._broker_name(broker_base_name, txn_produce, txn_consume)
- broker = self.broker(store_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
+ broker = self.broker(self._broker_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
snd_session, sndr = self._multi_queue_setup(queue_map, broker, exchange_name,
txn_produce, txn_consume, policy)
# Find expected limits
@@ -530,7 +538,7 @@
else:
del msgs[:] # Transient messages will be discarded on recover
old_broker = broker # keep for log analysis
- broker = self.broker(store_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
+ broker = self.broker(self._broker_args(), name=bname, expect=EXPECT_EXIT_OK,
log_level="debug+")
# Browse messages
if browse:
for index in range(0, len(queue_map)):