diff options
Diffstat (limited to 'qpid/cpp/src/tests/federated_cluster_test')
-rwxr-xr-x | qpid/cpp/src/tests/federated_cluster_test | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/qpid/cpp/src/tests/federated_cluster_test b/qpid/cpp/src/tests/federated_cluster_test index a781e269d6..8b3ce3cb95 100755 --- a/qpid/cpp/src/tests/federated_cluster_test +++ b/qpid/cpp/src/tests/federated_cluster_test @@ -22,7 +22,7 @@ # Test reliability of the replication feature in the face of link # failures: srcdir=`dirname $0` -PYTHON_DIR=$srcdir/../../../python +. $srcdir/python_env.sh trap stop_brokers EXIT @@ -61,22 +61,21 @@ start_brokers() { } setup() { - export PYTHONPATH=$PYTHON_DIR #create exchange on both cluster and single broker - $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange - $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange + $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange + $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange #create dynamic routes for test exchange - $PYTHON_DIR/commands/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange - $PYTHON_DIR/commands/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange + $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange + $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange #create test queue on cluster and bind it to the test exchange - $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" add queue test-queue - $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster + $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add queue test-queue + $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster #create test queue on single broker and bind it to the test exchange - $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue test-queue - $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster + $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue test-queue + $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster } run_test_pull_to_cluster_two_consumers() { @@ -127,25 +126,7 @@ run_test_pull_from_cluster() { if test -d ${PYTHON_DIR}; then - id -nG | grep '\<ais\>' >/dev/null || \ - NOGROUP="You are not a member of the ais group." - ps -u root | grep 'aisexec\|corosync' >/dev/null || \ - NOAISEXEC="The aisexec or corosync daemon is not running as root" - - if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then - cat <<EOF - - =========== WARNING: NOT RUNNING AIS TESTS ============== - - Not running federation to cluster test because: - $NOGROUP - $NOAISEXEC - - ========================================================== - -EOF - exit 0; - fi + . $srcdir/ais_check rm -f fed*.tmp #cleanup any files left from previous run start_brokers |