summaryrefslogtreecommitdiff
path: root/cpp/src/tests/start_cluster
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-29 18:18:52 +0000
committerAlan Conway <aconway@apache.org>2009-01-29 18:18:52 +0000
commitcd7e007f8f931f994c829e9853ecfbb469cb20aa (patch)
tree2f802a6f595c200968b57dab0c4e1b11a8ee3b1a /cpp/src/tests/start_cluster
parenta87557a9083d558251e9a6ac4f1b544797f41429 (diff)
downloadqpid-python-cd7e007f8f931f994c829e9853ecfbb469cb20aa.tar.gz
Run python tests against a single-member cluster in check-long.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@738947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/start_cluster')
-rwxr-xr-xcpp/src/tests/start_cluster17
1 files changed, 7 insertions, 10 deletions
diff --git a/cpp/src/tests/start_cluster b/cpp/src/tests/start_cluster
index ee306edf14..a9b45421cb 100755
--- a/cpp/src/tests/start_cluster
+++ b/cpp/src/tests/start_cluster
@@ -30,17 +30,14 @@ with_ais_group() {
test -f cluster.ports && { echo "cluster.ports file already exists" ; exit 1; }
rm -f cluster*.log
-SIZE=$1; shift
+SIZE=${1:-1}; shift
CLUSTER=`pwd` # Cluster name=pwd, avoid clashes.
OPTS="-d --load-module ../.libs/cluster.so --cluster-name=$CLUSTER --no-data-dir --auth=no $*"
-if test "$SIZE" = "one"; then # Special case of singleton cluster, use default port.
- ../qpidd -q
- with_ais_group ../qpidd $OPTS --log-to-file=cluster.log || exit 1
-else
- for (( i=0; i<SIZE; ++i )); do
- PORT=`with_ais_group ../qpidd -p0 --log-to-file=cluster$i.log $OPTS` || exit 1
- echo $PORT >> cluster.ports
- done
-fi
+for (( i=0; i<SIZE; ++i )); do
+ PORT=`with_ais_group ../qpidd -p0 --log-to-file=cluster$i.log $OPTS` || exit 1
+ echo $PORT >> cluster.ports
+done
+
+head cluster.ports > qpidd.port # First member's port for tests.