diff options
| author | Alan Conway <aconway@apache.org> | 2010-10-13 20:09:18 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-10-13 20:09:18 +0000 |
| commit | afee5c6b412a7df6d0da35e6581960cad5468dc5 (patch) | |
| tree | d0b61e545cb7e65fef607d8b64969cdd74aad6fc /qpid/cpp/src/tests/qpid-test-cluster | |
| parent | ed633977d7efaf46d3832f73fd39877c582b2640 (diff) | |
| download | qpid-python-afee5c6b412a7df6d0da35e6581960cad5468dc5.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@1022279 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-test-cluster')
| -rwxr-xr-x | qpid/cpp/src/tests/qpid-test-cluster | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/qpid/cpp/src/tests/qpid-test-cluster b/qpid/cpp/src/tests/qpid-test-cluster index 53d2bf436d..82f577e05f 100755 --- a/qpid/cpp/src/tests/qpid-test-cluster +++ b/qpid/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 } |
