Return-Path: Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: (qmail 33245 invoked from network); 25 Oct 2010 21:00:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Oct 2010 21:00:52 -0000 Received: (qmail 97006 invoked by uid 500); 25 Oct 2010 21:00:52 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 96992 invoked by uid 500); 25 Oct 2010 21:00:52 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 96985 invoked by uid 99); 25 Oct 2010 21:00:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 21:00:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 21:00:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D02732388980; Mon, 25 Oct 2010 20:59:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1027266 - /qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Date: Mon, 25 Oct 2010 20:59:52 -0000 To: commits@qpid.apache.org From: aconway@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101025205952.D02732388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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