[jboss-svn-commits] JBL Code SVN: r34200 - in labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts: common and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jul 26 13:26:41 EDT 2010
Author: whitingjr
Date: 2010-07-26 13:26:41 -0400 (Mon, 26 Jul 2010)
New Revision: 34200
Modified:
labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/common/common-api.xml
labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties
labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml
Log:
Added change to wait for server to shutdown.
Cleaned up common script.
Removed unnecessary param when calling target.
Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml 2010-07-26 16:32:36 UTC (rev 34199)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml 2010-07-26 17:26:41 UTC (rev 34200)
@@ -430,9 +430,8 @@
<target name="wait-for-benchmark-completion">
<echo>Checking to see if benchmark has completed.</echo>
<antcall target="check-and-wait">
- <param name="pid.output.file" value= "${jps.output.file}"/>
<param name="pid.process.name" value= "${benchmark.process.name}"/>
- <param name="wait.period.inMinutes" value= "${completion.wait.period}"/>
+ <param name="wait.period.inMilliSeconds" value= "${completion.wait.period}"/>
</antcall>
</target>
Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/common/common-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/common/common-api.xml 2010-07-26 16:32:36 UTC (rev 34199)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/common/common-api.xml 2010-07-26 17:26:41 UTC (rev 34200)
@@ -16,10 +16,9 @@
on the command line directly.
-->
-<project name="RedHat-JBoss-Performance:Common APC" default="usage" basedir=".">
+<project name="RedHat-JBoss-Performance:Common APC" basedir=".">
<target name="check-and-wait" description="General purpose script to detect if a java process is running. Will sleep the configured amount.">
- <delete file="${pid.output.file}"/>
<groovy>
import org.apache.commons.lang.StringUtils;
searchStr = "${properties['pid.process.name']}"
@@ -33,8 +32,8 @@
while ( checkVal = check(jpsOutput))
{
- println "The process [${properties['pid.process.name']}] is still running. Will wait ${properties['completion.wait.period.inMilliSeconds']} milli seconds."
- Thread.sleep("${properties['completion.wait.period.inMilliSeconds']}".toBigInteger().intValue())
+ println "The process [${properties['pid.process.name']}] is still running. Will wait ${properties['wait.period.inMilliSeconds']} milli seconds."
+ Thread.sleep("${properties['wait.period.inMilliSeconds']}".toBigInteger().intValue())
jpsOutput = "jps".execute().text
}
</groovy>
Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties 2010-07-26 16:32:36 UTC (rev 34199)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.properties 2010-07-26 17:26:41 UTC (rev 34200)
@@ -15,3 +15,6 @@
# this is the EAP server process name
process.name=Main
+
+# 6 seconds
+shutdown.wait.period.inMilliSeconds=12000
Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml 2010-07-26 16:32:36 UTC (rev 34199)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/server-controller/server-api.xml 2010-07-26 17:26:41 UTC (rev 34200)
@@ -22,6 +22,8 @@
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy"/>
+ <import file="../common/common-api.xml"/>
+
<target name="startup" >
<exec executable="${startup.command}" spawn="true">
<arg value="${startup.command.arguments.1}"/>
@@ -37,7 +39,11 @@
<exec executable="${shutdown.command}" output="/dev/null">
<arg value="--server=hornetq:1100"/>
</exec>
- <sleep minutes="1"/>
+ <echo>Checking to see if Server process has completed.</echo>
+ <antcall target="check-and-wait">
+ <param name="pid.process.name" value= "${process.name}"/>
+ <param name="wait.period.inMilliSeconds" value= "${shutdown.wait.period.inMilliSeconds}"/>
+ </antcall>
</target>
More information about the jboss-svn-commits
mailing list