summaryrefslogtreecommitdiff
path: root/qpid/tests
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2011-03-09 15:50:02 +0000
committerGordon Sim <gsim@apache.org>2011-03-09 15:50:02 +0000
commit4b5d41f653587be4083cde86962447c1d2431916 (patch)
tree9e4fa4058de3caa96438a808c1824c4ad5fa30a2 /qpid/tests
parent1d5a430601df6b557b06f4858a91e1c0eb239e1c (diff)
downloadqpid-python-4b5d41f653587be4083cde86962447c1d2431916.tar.gz
QPID-3132: Prevent threshold events triggering directly further threshold events
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1079854 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tests')
-rw-r--r--qpid/tests/src/py/qpid_tests/broker_0_10/threshold.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/threshold.py b/qpid/tests/src/py/qpid_tests/broker_0_10/threshold.py
index bcd3c507e2..6628ae8424 100644
--- a/qpid/tests/src/py/qpid_tests/broker_0_10/threshold.py
+++ b/qpid/tests/src/py/qpid_tests/broker_0_10/threshold.py
@@ -60,3 +60,18 @@ class ThresholdTests (Base):
def test_alert_size_alias(self):
self.do_threshold_test("x-qpid-maximum-message-size", 15, [Message("msg-%s" % i) for i in range(3)])
+
+ def test_alert_on_alert_queue(self):
+ rcv = self.ssn.receiver("qmf.default.topic/agent.ind.event.org_apache_qpid_broker.queueThresholdExceeded.#; {link:{x-declare:{arguments:{'qpid.alert_count':1}}}}")
+ rcvQMFv1 = self.ssn.receiver("qpid.management/console.event.#; {link:{x-declare:{arguments:{'qpid.alert_count':1}}}}")
+ snd = self.ssn.sender("ttq; {create:always, node: {x-declare:{auto_delete:True,exclusive:True,arguments:{'qpid.alert_count':1}}}}")
+ snd.send(Message("my-message"))
+ queues = []
+ for i in range(2):
+ event = rcv.fetch()
+ schema = event.content[0]["_schema_id"]
+ assert schema["_class_name"] == "queueThresholdExceeded"
+ values = event.content[0]["_values"]
+ queues.append(values["qName"])
+ assert "ttq" in queues, "expected event for ttq (%s)" % (queues)
+