summaryrefslogtreecommitdiff
path: root/cpp/src/tests/qpid-test-cluster
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-10-13 20:09:18 +0000
committerAlan Conway <aconway@apache.org>2010-10-13 20:09:18 +0000
commit3abdc3591d22293390d054c93790c22243935ad9 (patch)
tree63a61345177e0f68a5c9352261020c4f612ebbbe /cpp/src/tests/qpid-test-cluster
parentb4114a1428bfa6f7be602f7e317eeaa8053eab67 (diff)
downloadqpid-python-3abdc3591d22293390d054c93790c22243935ad9.tar.gz
Test client to measure cluster lag: greater delays in responses from some brokers.
Note yet incorporated into an automated test, but this is a useful stand-alone test client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/qpid-test-cluster')
-rwxr-xr-xcpp/src/tests/qpid-test-cluster15
1 files changed, 6 insertions, 9 deletions
diff --git a/cpp/src/tests/qpid-test-cluster b/cpp/src/tests/qpid-test-cluster
index 53d2bf436d..82f577e05f 100755
--- a/cpp/src/tests/qpid-test-cluster
+++ b/cpp/src/tests/qpid-test-cluster
@@ -18,9 +18,6 @@
# under the License.
#
-DEFAULT_CONF=~/qpid-test-qpidd.conf
-DEFAULT_ENV=~/qpid-test-env.sh
-
usage() {
echo "Usage: `basename $0` [options] start|stop|restart|check [qpidd-args]
Start/stop/restart a cluster on hosts in \$HOSTS via ssh.
@@ -35,8 +32,8 @@ Options:
exit 1
}
-absdir() { echo `cd $1 && pwd`; }
-copyall() { for h in $HOSTS; do rsync $1 $RSYNC_USER$h:$(absdir `dirname $1`); done; }
+DEFAULT_CONF=~/qpid-test-qpidd.conf
+DEFAULT_ENV=~/qpid-test-env.sh
test -f $DEFAULT_CONF && CONF_FILE=$DEFAULT_CONF
test -f $DEFAULT_ENV && ENV_FILE=$DEFAULT_ENV
@@ -54,21 +51,21 @@ CMD=$1; shift
QPIDD_ARGS="$QPIDD_ARGS $*"
if test -n "$CONF_FILE"; then
- copyall $CONF_FILE
+ RSYNCFILES="$RSYNCFILES $CONF_FILE"
QPIDD_ARGS="$QPIDD_ARGS --config $CONF_FILE"
QPID_PORT=${QPID_PORT:-`awk -F= '/^ *port=/ {print $2}' $CONF_FILE`}
fi
if test -n "$ENV_FILE"; then
- copyall $ENV_FILE
+ RSYNCFILES="$RSYNCFILES $ENV_FILE"
SOURCE_ENV="source $ENV_FILE && "
fi
-
+test -n "$RSYNCFILES" && rsynchosts $RSYNCFILES
do_start() {
for h in $HOSTS; do
COMMAND="qpidd -d $QPIDD_ARGS"
id -nG | grep '\<ais\>' >/dev/null && COMMAND="sg ais -c '$COMMAND'"
- ssh $SSHOPTS $h "$SOURCE_ENV $COMMAND"
+ ssh $SSHOPTS $h "$SOURCE_ENV $COMMAND" || { echo "error on $h: $COMMAND"; exit 1; }
done
}