summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/cluster.mk3
-rwxr-xr-xcpp/src/tests/cluster_failover7
-rwxr-xr-xcpp/src/tests/qpid-cluster-benchmark5
-rwxr-xr-xcpp/src/tests/qpid-cpp-benchmark18
4 files changed, 8 insertions, 25 deletions
diff --git a/cpp/src/tests/cluster.mk b/cpp/src/tests/cluster.mk
index 199d1e7b57..df24f021ba 100644
--- a/cpp/src/tests/cluster.mk
+++ b/cpp/src/tests/cluster.mk
@@ -25,8 +25,7 @@
CLUSTER_TEST_SCRIPTS_LIST= \
allhosts rsynchosts \
qpid-build-rinstall qpid-src-rinstall \
- qpid-test-cluster \
- qpid-cluster-benchmark
+ qpid-test-cluster
EXTRA_DIST += \
$(CLUSTER_TEST_SCRIPTS_LIST) \
diff --git a/cpp/src/tests/cluster_failover b/cpp/src/tests/cluster_failover
index 2a68d1ec79..43170c731a 100755
--- a/cpp/src/tests/cluster_failover
+++ b/cpp/src/tests/cluster_failover
@@ -11,8 +11,9 @@ echo $SEND $RECV
seq 1000000 > $SEND
-qpid-receive -f -a 'q;{create:always}' -b $URL --connection-options "{reconnect:true}" | tee $RECV &
-
-qpid-send -a 'q;{create:always}' -b $URL --connection-options "{reconnect:true}" --send-rate 10 --content-stdin < $SEND &
+qpid-send -a 'cluster_failover;{create:always}' -b $URL --connection-options "{reconnect:true}" --send-rate 10 --content-stdin < $SEND &
+while msg=$(qpid-receive -m1 -f -a 'cluster_failover;{create:always}' -b $URL --connection-options "{reconnect:true,heartbeat:1}"); do
+ echo -n $msg; date
+done
wait
diff --git a/cpp/src/tests/qpid-cluster-benchmark b/cpp/src/tests/qpid-cluster-benchmark
index 10b751c46d..fec2eb0e96 100755
--- a/cpp/src/tests/qpid-cluster-benchmark
+++ b/cpp/src/tests/qpid-cluster-benchmark
@@ -57,11 +57,12 @@ done
shift $(($OPTIND-1))
CONNECTION_OPTIONS="--connection-options {tcp-nodelay:$TCP_NODELAY,reconnect:$RECONNECT,heartbeat:$HEARTBEAT}"
+CREATE_OPTIONS="node:{x-declare:{arguments:{'qpid.replicate':all}}}"
-REPLICATE="node:{x-declare:{arguments:{'qpid.replicate':all}}}"
BROKER=$(echo $BROKERS | sed s/,.*//)
run_test() { echo $*; shift; "$@"; echo; echo; echo; }
OPTS="$OPTS $REPEAT $BROKERS --summarize $QUEUES $SENDERS $RECEIVERS $MESSAGES $CLIENT_HOSTS $SAVE_RECEIVED $CONNECTION_OPTIONS $NO_DELETE"
-OPTS="$OPTS --create-option $REPLICATE"
+OPTS="$OPTS --create-option $CREATE_OPTIONS"
+
run_test "Benchmark:" qpid-cpp-benchmark $OPTS "$@"
diff --git a/cpp/src/tests/qpid-cpp-benchmark b/cpp/src/tests/qpid-cpp-benchmark
index 19c01dd08a..1c649b333a 100755
--- a/cpp/src/tests/qpid-cpp-benchmark
+++ b/cpp/src/tests/qpid-cpp-benchmark
@@ -169,18 +169,6 @@ def first_line(p):
raise Exception("Process exit %d: %s"%(p.returncode, error_msg(out,err)))
return out.split("\n")[0]
-def queue_exists(queue,broker):
- c = qpid.messaging.Connection(broker)
- c.open()
- try:
- s = c.session()
- try:
- s.sender(queue)
- return True
- except qpid.messaging.exceptions.NotFound:
- return False
- finally: c.close()
-
def recreate_queues(queues, brokers, no_delete, opts):
c = qpid.messaging.Connection(brokers[0])
c.open()
@@ -189,15 +177,9 @@ def recreate_queues(queues, brokers, no_delete, opts):
if not no_delete:
try: s.sender("%s;{delete:always}"%(q)).close()
except qpid.messaging.exceptions.NotFound: pass
- # FIXME aconway 2011-05-04: new cluster async wiring, wait for changes to propagate
- for b in brokers:
- while queue_exists(q,b): time.sleep(0.1);
address = "%s;{%s}"%(q, ",".join(opts.create_option + ["create:always"]))
if opts.verbose: print "Creating", address
s.sender(address)
- # FIXME aconway 2011-05-04: new cluster async wiring, wait for changes to propagate
- for b in brokers:
- while not queue_exists(q,b): time.sleep(0.1);
c.close()
def print_header(timestamp):