summaryrefslogtreecommitdiff
path: root/python/qpid/tests/messaging.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-09-03 18:22:10 +0000
committerRafael H. Schloming <rhs@apache.org>2009-09-03 18:22:10 +0000
commit82fd43ffbe33ed0e368ea70ccbb6963994a1f5ba (patch)
tree25c08df2373dc5078bae760cb43ca2c0883e2a69 /python/qpid/tests/messaging.py
parent22008b3dfae9f69f3a26df68da7852c01933111e (diff)
downloadqpid-python-82fd43ffbe33ed0e368ea70ccbb6963994a1f5ba.tar.gz
added timeout option to send
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@811066 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/tests/messaging.py')
-rw-r--r--python/qpid/tests/messaging.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/python/qpid/tests/messaging.py b/python/qpid/tests/messaging.py
index d734bb421f..7623c1f93b 100644
--- a/python/qpid/tests/messaging.py
+++ b/python/qpid/tests/messaging.py
@@ -599,6 +599,22 @@ class SenderTests(Base):
def testSendAsyncCapacityUNLIMITED(self):
self.asyncTest(UNLIMITED)
+ def testCapacityTimeout(self):
+ self.snd.capacity = 1
+ msgs = []
+ caught = False
+ while len(msgs) < 100:
+ m = self.content("testCapacity", len(msgs))
+ try:
+ self.snd.send(m, sync=False, timeout=0)
+ msgs.append(m)
+ except InsufficientCapacity:
+ caught = True
+ break
+ self.drain(self.rcv, expected=msgs)
+ self.ssn.acknowledge()
+ assert caught, "did not exceed capacity"
+
class MessageTests(Base):
def testCreateString(self):