From: Francisco R. <rev...@im...> - 2005-05-10 00:24:33
|
User: reverbel Date: 05/05/09 20:23:51 Modified: jbosstest build.xml Log: Add DTM test. Revision Changes Path 1.456 +90 -1 jbosstest/build.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: build.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/build.xml,v retrieving revision 1.455 retrieving revision 1.456 diff -u -b -r1.455 -r1.456 --- build.xml 4 May 2005 23:14:42 -0000 1.455 +++ build.xml 10 May 2005 00:23:51 -0000 1.456 @@ -6,7 +6,7 @@ <!-- See terms of license at http://www.gnu.org. --> <!-- ============================================================ --> -<!-- $Id: build.xml,v 1.455 2005/05/04 23:14:42 starksm Exp $ --> +<!-- $Id: build.xml,v 1.456 2005/05/10 00:23:51 reverbel Exp $ --> <project default="main" name="JBoss/Testsuite"> <import file="../tools/etc/buildmagic/build-common.xml"/> @@ -922,6 +922,95 @@ <wait-on-shutdown conf="tomcat-sso-cluster1"/> </target> + <!-- DTM two-phase commit tests --> + <target name="dtm-tests" description="DTM two-phase commit tests"> + <!-- Create configs dtm0-dtm3 with DTM and OTS --> + <create-dtm-config conf="dtm0"/> + <create-dtm-config conf="dtm1"/> + <create-dtm-config conf="dtm2"/> + <create-dtm-config conf="dtm3"/> + <!-- Deploy EJBs that will be called as transaction participants --> + <copy todir="${jboss.dist}/server/dtm1/deploy" overwrite="true" + file="${build.lib}/dtmaccount.jar"/> + <copy todir="${jboss.dist}/server/dtm2/deploy" overwrite="true" + file="${build.lib}/dtmaccount.jar"/> + <copy todir="${jboss.dist}/server/dtm3/deploy" overwrite="true" + file="${build.lib}/dtmaccount.jar"/> + <!-- Start DTM nodes --> + <start-jboss conf="dtm0" host="${node0}"/> + <start-jboss conf="dtm1" host="${node1}"/> + <start-jboss conf="dtm2" host="${node2}"/> + <start-jboss conf="dtm3" host="${node3}"/> + <echo message="Waiting for DTM nodes to start..."/> + <waitfor maxwait="120" maxwaitunit="second" checkevery="5" + checkeveryunit="second" timeoutproperty="startup.timeout"> + <and> + <http url="http://${node0}:8080/"/> + <http url="http://${node1}:8080/"/> + <http url="http://${node2}:8080/"/> + <http url="http://${node3}:8080/"/> + </and> + </waitfor> + <fail message="Timeout waiting for nodes to start" if="startup.timeout"/> + <echo message="Nodes have started, waiting for node set to stablize..."/> + <sleep seconds="10" /> + <!-- Run DTM unit tests --> + <antcall target="tests-dtm-unit"/> + <!-- Stop DTM nodes --> + <stop-jboss url="jnp://${node0}:1099"/> + <stop-jboss url="jnp://${node1}:1099"/> + <stop-jboss url="jnp://${node2}:1099"/> + <stop-jboss url="jnp://${node3}:1099"/> + </target> + + <!-- DTM unit tests --> + <target name="tests-dtm-unit"> + <echo><![CDATA[ + junit.timeout: ${junit.timeout} + jbosstest.iterationcount: ${jbosstest.iterationcount} + jbosstest.threadcount: ${jbosstest.threadcount} + jbosstest.beancount: ${jbosstest.beancount} + ]]></echo> + <mkdir dir="${build.reports}"/> + <mkdir dir="${build.testlog}"/> + <junit dir="${module.output}" + printsummary="${junit.printsummary}" + haltonerror="${junit.haltonerror}" + haltonfailure="${junit.haltonfailure}" + fork="${junit.fork}" + timeout="${junit.timeout}" + jvm="${junit.jvm}"> + + <jvmarg value="${junit.jvm.options}"/> + <!-- Used for JGroups --> + <jvmarg value="-Dbind.address=${node0}"/> + <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> + <!-- Pass along any jbosstest.* system properties --> + <syspropertyset> + <propertyref prefix="jbosstest."/> + </syspropertyset> + <classpath> + <pathelement location="${build.classes}"/> + <pathelement location="${build.resources}"/> + <path refid="tests.classpath"/> + </classpath> + + <formatter type="xml" usefile="${junit.formatter.usefile}"/> + + <batchtest todir="${build.reports}" + haltonerror="${junit.batchtest.haltonerror}" + haltonfailure="${junit.batchtest.haltonfailure}" + fork="${junit.batchtest.fork}"> + + <fileset dir="${build.classes}"> + <include name="**/DTMUnitTestCase.class"/> + </fileset> + </batchtest> + </junit> + </target> + <target name="test-example-binding-manager" description="Test the example binding configuration" > |