From 54260c15b9105a1e81bee43c860ef61013d98a39 Mon Sep 17 00:00:00 2001 From: Robert Greig Date: Tue, 6 Feb 2007 11:45:19 +0000 Subject: (Submitted by Rupert Smith) Added virtual hosts in order to run tests against Java broker. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/perftesting_persistent@504087 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/tests/client_test.cpp | 2 +- qpid/cpp/tests/topic_listener.cpp | 2 +- qpid/cpp/tests/topic_publisher.cpp | 2 +- qpid/cpp/tests/topictest | 84 +++++++++++++++++++------------------- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/qpid/cpp/tests/client_test.cpp b/qpid/cpp/tests/client_test.cpp index 9534fdcecb..f869cf4860 100644 --- a/qpid/cpp/tests/client_test.cpp +++ b/qpid/cpp/tests/client_test.cpp @@ -68,7 +68,7 @@ int main(int argc, char**) Connection con(argc > 1); string host("localhost"); - con.open(host); + con.open(host, 5672, "guest", "guest", "/test"); std::cout << "Opened connection." << std::endl; //Create and open a channel on the connection through which diff --git a/qpid/cpp/tests/topic_listener.cpp b/qpid/cpp/tests/topic_listener.cpp index 06c1765786..7a32373492 100644 --- a/qpid/cpp/tests/topic_listener.cpp +++ b/qpid/cpp/tests/topic_listener.cpp @@ -103,7 +103,7 @@ int main(int argc, char** argv){ }else{ try{ Connection connection(args.getTrace()); - connection.open(args.getHost(), args.getPort()); + connection.open(args.getHost(), args.getPort(), "guest", "guest", "/test"); Channel channel(args.getTransactional(), args.getPrefetch()); connection.openChannel(&channel); diff --git a/qpid/cpp/tests/topic_publisher.cpp b/qpid/cpp/tests/topic_publisher.cpp index b95abd9d66..31e5fc3fc2 100644 --- a/qpid/cpp/tests/topic_publisher.cpp +++ b/qpid/cpp/tests/topic_publisher.cpp @@ -118,7 +118,7 @@ int main(int argc, char** argv){ }else{ try{ Connection connection(args.getTrace()); - connection.open(args.getHost(), args.getPort()); + connection.open(args.getHost(), args.getPort(), "guest", "guest", "/test"); Channel channel(args.getTransactional(), args.getPrefetch()); connection.openChannel(&channel); diff --git a/qpid/cpp/tests/topictest b/qpid/cpp/tests/topictest index 792f063bea..f6081b3bbd 100755 --- a/qpid/cpp/tests/topictest +++ b/qpid/cpp/tests/topictest @@ -1,42 +1,42 @@ -#!/bin/bash -# Run the c++ or java topic test - -. `dirname $0`/env - -# Edit parameters here: - -# Big test: -# LISTENERS=10 -# MESSAGES=10000 -# BATCHES=20 - -LISTENERS=10 -MESSAGES=2000 -BATCHES=10 - -cppcmds() { - LISTEN_CMD=topic_listener - PUBLISH_CMD="topic_publisher -messages $MESSAGES -batches $BATCHES -subscribers $LISTENERS" -} - -javacmds() { - DEF=-Damqj.logging.level="error" - LISTEN_CMD="qpid-run $DEF org.apache.qpid.topic.Listener" - PUBLISH_CMD="qpid-run $DEF org.apache.qpid.topic.Publisher -messages $MESSAGES -batch $BATCHES -clients $LISTENERS" -} - -case $1 in - c) cppcmds ;; - j) javacmds ;; - *) cppcmds ;; -esac - -for ((i=$LISTENERS ; i--; )); do - $LISTEN_CMD > /dev/null 2>&1 & -done -sleep 1 -echo $PUBLISH_CMD $OPTIONS - -STATS=~/bin/topictest.times -echo "---- topictest `date`" >> $STATS -$PUBLISH_CMD $OPTIONS | tee -a $STATS +#!/bin/bash +# Run the c++ or java topic test + +. `dirname $0`/env + +# Edit parameters here: + +# Big test: +# LISTENERS=10 +# MESSAGES=10000 +# BATCHES=20 + +LISTENERS=10 +MESSAGES=2000 +BATCHES=10 + +cppcmds() { + LISTEN_CMD=./topic_listener + PUBLISH_CMD="./topic_publisher -messages $MESSAGES -batches $BATCHES -subscribers $LISTENERS" +} + +javacmds() { + DEF=-Damqj.logging.level="error" + LISTEN_CMD="qpid-run $DEF org.apache.qpid.topic.Listener" + PUBLISH_CMD="qpid-run $DEF org.apache.qpid.topic.Publisher -messages $MESSAGES -batch $BATCHES -clients $LISTENERS" +} + +case $1 in + c) cppcmds ;; + j) javacmds ;; + *) cppcmds ;; +esac + +for ((i=$LISTENERS ; i--; )); do + $LISTEN_CMD > /dev/null 2>&1 & +done +sleep 1 +echo $PUBLISH_CMD $OPTIONS + +STATS=~/bin/topictest.times +echo "---- topictest `date`" >> $STATS +$PUBLISH_CMD $OPTIONS | tee -a $STATS -- cgit v1.2.1