summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-17 21:28:05 +0000
committerAlan Conway <aconway@apache.org>2010-05-17 21:28:05 +0000
commitf3a87cca79dc00d76dc76b5143556b4446c297c0 (patch)
tree08e443cf4b84e1c5a56d1fd64f24b44e7be429c4 /python
parent01229d655617794cf001eead8ea70758c97f7267 (diff)
downloadqpid-python-f3a87cca79dc00d76dc76b5143556b4446c297c0.tar.gz
Use new API clients qpid_send, qpid_receive instead of sender/receiver in brokertests.py
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@945385 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/brokertest.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/python/qpid/brokertest.py b/python/qpid/brokertest.py
index c55ca7980d..2242dcb88c 100644
--- a/python/qpid/brokertest.py
+++ b/python/qpid/brokertest.py
@@ -514,14 +514,20 @@ class NumberedSender(Thread):
Thread to run a sender client and send numbered messages until stopped.
"""
- def __init__(self, broker, max_depth=None):
+ def __init__(self, broker, max_depth=None, queue="test-queue"):
"""
max_depth: enable flow control, ensure sent - received <= max_depth.
Requires self.notify_received(n) to be called each time messages are received.
"""
Thread.__init__(self)
self.sender = broker.test.popen(
- [broker.test.sender_exec, "--port", broker.port()], expect=EXPECT_RUNNING)
+ ["qpid_send",
+ "--broker", "localhost:%s"%broker.port(),
+ "--address", "%s;{create:always}"%queue,
+ "--failover-updates",
+ "--content-stdin"
+ ],
+ expect=EXPECT_RUNNING)
self.condition = Condition()
self.max = max_depth
self.received = 0
@@ -567,15 +573,21 @@ class NumberedReceiver(Thread):
Thread to run a receiver client and verify it receives
sequentially numbered messages.
"""
- def __init__(self, broker, sender = None):
+ def __init__(self, broker, sender = None, queue="test-queue"):
"""
sender: enable flow control. Call sender.received(n) for each message received.
"""
Thread.__init__(self)
self.test = broker.test
self.receiver = self.test.popen(
- [self.test.receiver_exec, "--port", broker.port()],
- expect=EXPECT_RUNNING, drain=False)
+ ["qpid_receive",
+ "--broker", "localhost:%s"%broker.port(),
+ "--address", "%s;{create:always}"%queue,
+ "--failover-updates",
+ "--forever"
+ ],
+ expect=EXPECT_RUNNING,
+ drain=False)
self.lock = Lock()
self.error = None
self.sender = sender