summaryrefslogtreecommitdiff
path: root/qpid/java/testkit
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
commit5f74705f9799b44d6688a59f67c4ae945f5d85d6 (patch)
tree49447112278c67addd15c5161c45131038647aa2 /qpid/java/testkit
parent87ec8808ec5d20749e15d91d91b2b006706b04ad (diff)
downloadqpid-python-5f74705f9799b44d6688a59f67c4ae945f5d85d6.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@674391 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/testkit')
-rw-r--r--qpid/java/testkit/bin/perf_report.sh33
-rw-r--r--qpid/java/testkit/bin/run_pub.sh7
-rw-r--r--qpid/java/testkit/bin/run_sub.sh7
-rw-r--r--qpid/java/testkit/bin/setenv.sh5
-rw-r--r--qpid/java/testkit/etc/test.log4j31
5 files changed, 50 insertions, 33 deletions
diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh
index 8e25ced685..cafe4fa07f 100644
--- a/qpid/java/testkit/bin/perf_report.sh
+++ b/qpid/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/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh
index 27acd52e47..a2a67118c5 100644
--- a/qpid/java/testkit/bin/run_pub.sh
+++ b/qpid/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/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh
index 35884b9a4a..232b954c39 100644
--- a/qpid/java/testkit/bin/run_sub.sh
+++ b/qpid/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/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh
index 3dba383029..da039271a3 100644
--- a/qpid/java/testkit/bin/setenv.sh
+++ b/qpid/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
diff --git a/qpid/java/testkit/etc/test.log4j b/qpid/java/testkit/etc/test.log4j
new file mode 100644
index 0000000000..dd48b82da7
--- /dev/null
+++ b/qpid/java/testkit/etc/test.log4j
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+log4j.rootLogger=${root.logging.level}
+
+log4j.logger.org.apache.qpid=ERROR, console
+log4j.additivity.org.apache.qpid=false
+
+log4j.logger.org.apache.qpidity=ERROR, console
+log4j.additivity.org.apache.qpidity=false
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.Threshold=all
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
+