summaryrefslogtreecommitdiff
path: root/cpp/src/tests/clustered_replication_test
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-09-28 21:17:31 +0000
committerAlan Conway <aconway@apache.org>2009-09-28 21:17:31 +0000
commit576b578d61d0d31082587bf77a25a59da2ba738f (patch)
treee1b49a066a2263794e43276dfa4b97bb5d9112b5 /cpp/src/tests/clustered_replication_test
parent4b8343c7a9461a5d80858a020cdabde684d722f7 (diff)
downloadqpid-python-576b578d61d0d31082587bf77a25a59da2ba738f.tar.gz
Fix python tests to work in VPATH builds and for make distcheck.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/clustered_replication_test')
-rwxr-xr-xcpp/src/tests/clustered_replication_test17
1 files changed, 8 insertions, 9 deletions
diff --git a/cpp/src/tests/clustered_replication_test b/cpp/src/tests/clustered_replication_test
index e3bc9cb65e..4713f4b3f9 100755
--- a/cpp/src/tests/clustered_replication_test
+++ b/cpp/src/tests/clustered_replication_test
@@ -22,8 +22,7 @@
# Test reliability of the replication feature in the face of link
# failures:
srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python/temp
-export PYTHONPATH=$PYTHON_DIR
+. $srcdir/python_env.sh
trap stop_brokers INT EXIT
@@ -55,7 +54,7 @@ stop_brokers() {
fi
}
-if test -d ${PYTHON_DIR}; then
+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 || \
@@ -89,8 +88,8 @@ EOF
#start first node of primary cluster and set up test queue
echo Starting primary cluster
PRIMARY1=$(with_ais_group ../qpidd $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.1.tmp) || fail "Could not start node"
- $PYTHON_DIR/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
- $PYTHON_DIR/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
#send 10 messages, consume 5 of them
for i in `seq 1 10`; do echo Message$i; done | ./sender --port $PRIMARY1
@@ -105,10 +104,10 @@ EOF
DR1=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.1.tmp)
DR2=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.2.tmp)
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add queue test-queue
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add queue control-queue
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
- $PYTHON_DIR/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue test-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue control-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
+ $PYTHON_COMMANDS/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
#send more messages to primary
for i in `seq 11 20`; do echo Message$i; done | ./sender --port $PRIMARY1 --send-eos 1