summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/brokertest.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-04-15 20:40:06 +0000
committerAlan Conway <aconway@apache.org>2011-04-15 20:40:06 +0000
commite19102eab2df74b491000e7376b459bead70d173 (patch)
tree248feb518770ef5776dcfa4e05d080212dbf9c5a /qpid/cpp/src/tests/brokertest.py
parent8f1c852464651469d4a71c2cd7f0d64863f99974 (diff)
downloadqpid-python-e19102eab2df74b491000e7376b459bead70d173.tar.gz
Revert "QPID-3208: Exchanges make best effort to route messages if there is an error."
This reverts commit r1092765 which introduced test failures in make check. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1092804 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/brokertest.py')
-rw-r--r--qpid/cpp/src/tests/brokertest.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py
index a19dd305e5..4abe4c2cbe 100644
--- a/qpid/cpp/src/tests/brokertest.py
+++ b/qpid/cpp/src/tests/brokertest.py
@@ -484,24 +484,18 @@ class BrokerTest(TestCase):
cluster = Cluster(self, count, args, expect=expect, wait=wait)
return cluster
- def browse(self, session, queue, timeout=0):
+ def assert_browse(self, session, queue, expect_contents, timeout=0):
"""Assert that the contents of messages on queue (as retrieved
using session and timeout) exactly match the strings in
expect_contents"""
+
r = session.receiver("%s;{mode:browse}"%(queue))
+ actual_contents = []
try:
- contents = []
- try:
- while True: contents.append(r.fetch(timeout=timeout).content)
- except messaging.Empty: pass
- finally: pass #FIXME aconway 2011-04-14: r.close()
- return contents
-
- def assert_browse(self, session, queue, expect_contents, timeout=0):
- """Assert that the contents of messages on queue (as retrieved
- using session and timeout) exactly match the strings in
- expect_contents"""
- actual_contents = self.browse(session, queue, timeout)
+ for c in expect_contents: actual_contents.append(r.fetch(timeout=timeout).content)
+ while True: actual_contents.append(r.fetch(timeout=0).content) # Check for extra messages.
+ except messaging.Empty: pass
+ r.close()
self.assertEqual(expect_contents, actual_contents)
def join(thread, timeout=10):