summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-11-04 19:12:59 +0000
committerAlan Conway <aconway@apache.org>2010-11-04 19:12:59 +0000
commite4a72b66fdf2da41d2a2c484ae41773cbc75c2e6 (patch)
treed1769539d65dffb8ff9a3b3542cfa944b1ae3e3b
parent10a368d1773654455e678d604f0d3b7e4e95255b (diff)
downloadqpid-python-e4a72b66fdf2da41d2a2c484ae41773cbc75c2e6.tar.gz
qpid-cpp-benchmark: allow extra arguments to qpid-send/receive, fix exception error.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1031162 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/cpp/src/tests/qpid-cpp-benchmark10
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark
index 1e0d75a49e..7d9d45435f 100755
--- a/qpid/cpp/src/tests/qpid-cpp-benchmark
+++ b/qpid/cpp/src/tests/qpid-cpp-benchmark
@@ -53,6 +53,10 @@ op.add_option("--send-option", default=[], action="append", type="str",
help="Additional option for sending addresses")
op.add_option("--receive-option", default=[], action="append", type="str",
help="Additional option for receiving addresses")
+op.add_option("--send-arg", default=[], action="append", type="str",
+ help="Additional argument for qpid-send")
+op.add_option("--receive-arg", default=[], action="append", type="str",
+ help="Additional argument for qpid-receive")
op.add_option("--no-timestamp", dest="timestamp", default=True,
action="store_false", help="don't add a timestamp, no latency results")
op.add_option("--connection-options", type="str",
@@ -79,6 +83,7 @@ def start_receive(queue, opts, ready_queue, broker, host):
"--ack-frequency", str(opts.ack_frequency),
"--ready-address", ready_queue,
"--report-header=no"]
+ command += opts.receive_arg
if opts.connection_options:
command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
@@ -97,6 +102,7 @@ def start_send(queue, opts, broker, host):
"--report-header=no",
"--timestamp=%s"%(opts.timestamp and "yes" or "no"),
"--sequence=no"]
+ command += opts.send_arg
if opts.connection_options:
command += ["--connection-options",opts.connection_options]
if host: command = ssh_command(host, command)
@@ -172,8 +178,8 @@ class ReadyReceiver:
for r in receivers:
if (r.poll() is not None):
out,err=r.communicate()
- raise "Receiver error: %s"%(out)
- raise "Timed out waiting for receivers to be ready"
+ raise Exception("Receiver error: %s"%(out))
+ raise Exception("Timed out waiting for receivers to be ready")
def flatten(l): return sum(map(lambda s: s.split(","), l),[])