qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1027266 - /qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
Date Mon, 25 Oct 2010 20:59:52 GMT
Author: aconway
Date: Mon Oct 25 20:59:52 2010
New Revision: 1027266

URL: http://svn.apache.org/viewvc?rev=1027266&view=rev
Log:
Fix bug in qpid-cpp-benchmark.

Symptom was exit with:
  File "/home/remote/aconway/qpid/qpid/cpp/src/tests/qpid-cpp-benchmark", line 172, in wait
    if (r.poll()): raise "Receiver error: %s"%(wait_for_output(r))
NameError: global name 'wait_for_output' is not defined

Modified:
    qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1027266&r1=1027265&r2=1027266&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Mon Oct 25 20:59:52 2010
@@ -161,6 +161,7 @@ class ReadyReceiver:
         self.connection.open()
         self.receiver = self.connection.session().receiver(
             "%s;{create:always,delete:always}"%(queue))
+        self.receiver.session.sync()
         self.timeout=2
 
     def wait(self, receivers):
@@ -169,7 +170,9 @@ class ReadyReceiver:
             self.connection.close()
         except qpid.messaging.Empty:
             for r in receivers:
-                if (r.poll()): raise "Receiver error: %s"%(wait_for_output(r))
+                if (r.poll() is not None):
+                    out,err=r.communicate()
+                    raise "Receiver error: %s"%(out)
             raise "Timed out waiting for receivers to be ready"
 
 def flatten(l): return sum(map(lambda s: s.split(","), l),[])
@@ -197,7 +200,6 @@ def main():
     ready_queue="%s-ready"%(opts.queue_name)
     queues = ["%s-%s"%(opts.queue_name, i) for i in xrange(opts.queues)]
     for i in xrange(opts.repeat):
-
         delete_queues(queues, opts.broker[0])
         ready_receiver = ReadyReceiver(ready_queue, opts.broker[0])
         receivers = [start_receive(q, opts, ready_queue, brokers.next(), client_hosts.next())



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message