summaryrefslogtreecommitdiff
path: root/java/testkit/bin
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2008-07-07 03:44:28 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2008-07-07 03:44:28 +0000
commit1be3f99141dbf1518b897a41193c7b7983915f37 (patch)
treed8f7aa7593c53dff6643e89a615a752898aada36 /java/testkit/bin
parent3635695453c9607af72ebfa32c35ceed3f11acb0 (diff)
downloadqpid-python-1be3f99141dbf1518b897a41193c7b7983915f37.tar.gz
This is related to QPID-1161.
Made minor modifications to the scripts and added a log4j file for the tests. The scripts are now modified to use the JAVA_HOME. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674391 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/testkit/bin')
-rw-r--r--java/testkit/bin/perf_report.sh33
-rw-r--r--java/testkit/bin/run_pub.sh7
-rw-r--r--java/testkit/bin/run_sub.sh7
-rw-r--r--java/testkit/bin/setenv.sh5
4 files changed, 19 insertions, 33 deletions
diff --git a/java/testkit/bin/perf_report.sh b/java/testkit/bin/perf_report.sh
index 8e25ced685..cafe4fa07f 100644
--- a/java/testkit/bin/perf_report.sh
+++ b/java/testkit/bin/perf_report.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -22,8 +22,9 @@
# NB: You must add the Qpid client and common jars to your CLASSPATH
# before running this script
-MAX_SUB_MEM=1024M
-MAX_PUB_MEM=1024M
+SUB_MEM=-Xmx1024M
+PUB_MEM=-Xmx1024M
+LOG_CONFIG=-Dlog4j.configuration="$QPID_TEST_HOME/etc/test.log4j"
. setenv.sh
@@ -42,25 +43,15 @@ cleanup()
# $3 producer options
run_testcase()
{
- sh run_sub.sh $2 > sub.out &
+ sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out &
waitfor sub.out "Warming up"
- sh run_pub.sh $3 > pub.out &
+ sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out &
waitfor sub.out "Completed the test"
waitfor pub.out "Consumer has completed the test"
sleep 2 #give a grace period to shutdown
print_result $1
}
-run_sub()
-{
- java -cp $CLASSPATH -Xmx$MAX_SUB_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer
-}
-
-run_pub()
-{
- java -cp $CLASSPATH -Xmx$MAX_PUB_MEM $@ org.apache.qpid.testkit.perf.PerfProducer
-}
-
print_result()
{
prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'`
@@ -91,19 +82,19 @@ run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dms
run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true"
# Test 4 Topic
-#run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10"
+run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 5 Durable Topic
-run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10"
+#run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10"
# Test 6 Fanout
run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10"
# Test 7 Small TX
-#run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \
-# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1"
+run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \
+ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1"
# Test 8 Large TX
-#run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size-10" \
-# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10"
+run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \
+ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10"
diff --git a/java/testkit/bin/run_pub.sh b/java/testkit/bin/run_pub.sh
index 27acd52e47..a2a67118c5 100644
--- a/java/testkit/bin/run_pub.sh
+++ b/java/testkit/bin/run_pub.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -24,8 +24,5 @@
. setenv.sh
-MAX_MEM=1024M
-
echo "$@"
-java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfProducer
-
+$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer
diff --git a/java/testkit/bin/run_sub.sh b/java/testkit/bin/run_sub.sh
index 35884b9a4a..232b954c39 100644
--- a/java/testkit/bin/run_sub.sh
+++ b/java/testkit/bin/run_sub.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -24,7 +24,6 @@
. setenv.sh
-MAX_MEM=1024M
-
-java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer
+echo "$@"
+$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer
diff --git a/java/testkit/bin/setenv.sh b/java/testkit/bin/setenv.sh
index 3dba383029..da039271a3 100644
--- a/java/testkit/bin/setenv.sh
+++ b/java/testkit/bin/setenv.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -xv
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -36,7 +36,6 @@ fi
# VENDOR_LIB path needs to be set
# for Qpid set this to {qpid_checkout}/java/build/lib
-VENDOR_LIB=""
if [ "$VENDOR_LIB" = "" ] ; then
echo "ERROR: Please set VENDOR_LIB path in the script ...."
exit 1
@@ -46,7 +45,7 @@ fi
[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes
CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"`
-javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
+$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH