Author: gsim
Date: Fri Feb 19 23:00:25 2016
New Revision: 1731309

URL: http://svn.apache.org/viewvc?rev=1731309&view=rev
Log:
QPID-7076: Avoid error with qpid-cpp-benchmark with 0 senders. Patch from 
[email protected]

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=1731309&r1=1731308&r2=1731309&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Fri Feb 19 23:00:25 2016
@@ -340,16 +340,19 @@ def main():
                 # First fill the queues, then drain them
                 start = time.time()
                 senders = start_senders()
-                for p in senders: p.wait()
+                for p in senders:
+                    if p: p.wait()
                 receivers = start_receivers()
-                for p in receivers: p.wait()
+                for p in receivers:
+                    if p: p.wait()
             else:
                 # Run senders and receivers in parallel
                 receivers = start_receivers()
                 ready_receiver.wait(filter(None, receivers)) # Wait for 
receivers ready
                 start = time.time()
                 senders = start_senders()
-                for p in senders + receivers: p.wait()
+                for p in senders + receivers:
+                    if p: p.wait()
 
             total_sent = opts.queues * opts.senders * opts.messages
             total_tp = total_sent / (time.time()-start)



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to