From: Ryan C. <rca...@jb...> - 2005-07-26 00:55:27
|
User: rcampbell Date: 05/07/25 20:54:16 Modified: jbosstest build.xml Log: Migrate the rest of the head testsuite to the server controller taskdefs. Revision Changes Path 1.481 +69 -165 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.480 retrieving revision 1.481 diff -u -b -r1.480 -r1.481 --- build.xml 22 Jul 2005 18:27:23 -0000 1.480 +++ build.xml 26 Jul 2005 00:54:16 -0000 1.481 @@ -6,7 +6,7 @@ <!-- See terms of license at http://www.gnu.org. --> <!-- ============================================================ --> -<!-- $Id: build.xml,v 1.480 2005/07/22 18:27:23 smarlow Exp $ --> +<!-- $Id: build.xml,v 1.481 2005/07/26 00:54:16 rcampbell Exp $ --> <project default="main" name="JBoss/Testsuite" xmlns:server="http://jboss.org/ns/test/ant/server"> @@ -643,25 +643,19 @@ <target name="jboss-minimal-tests" description="Validate the minimal config"> - <start-jboss conf="minimal" host="${node0}" /> + <server:start name="minimal"/> <copy file="${build.lib}/shutdown.sar" todir="${jboss.dist}/server/minimal/deploy" /> - <!-- Wait for the 1099 jndi port --> - <waitfor maxwait="30" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="minimal.timeout"> - <and> - <socket server="${node0}" port="1099" /> - </and> - </waitfor> - <fail message="Timeout waiting for minimal to start" if="minimal.timeout"/> <echo message="Minimal server started, stopping"/> + <sleep seconds="5"/> <delete file="${jboss.dist}/server/minimal/deploy/shutdown.sar" /> + <sleep seconds="7"/> </target> <target name="jboss-all-config-tests" description="The units tests which are run against the jboss all config"> - <start-jboss conf="all" jvmargs="-Djava.endorsed.dirs=${jboss.dist}/lib/endorsed -Xmx128m"/> - <wait-on-host/> + <server:start name="all"/> + <antcall target="tests-standard-unit"/> <antcall target="tests-client-unit"/> <antcall target="tests-security-basic-unit"/> @@ -671,8 +665,8 @@ <antcall target="tests-jbossmx-performance"/> <antcall target="tests-iiop"/> <antcall target="tests-webservice" /> - <stop-jboss/> - <wait-on-shutdown conf="all" /> + + <server:stop name="all"/> </target> <target name="tests-apache-tomcat-clustering" @@ -681,18 +675,9 @@ <!-- Definition of apache is in imports/server-config.xml --> <apache location="${apache.location}" action-type="start"/> <create-cluster-node conf="node0"/> - <start-jboss conf="node0" host="${node0}"/> + <server:start name="node0" /> <create-cluster-node conf="node1"/> - <start-jboss conf="node1" host="${node1}"/> - <echo message="Waiting for nodes to start..."/> - <waitfor maxwait="120" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="cluster.timeout"> - <and> - <http url="${node0.http.url}"/> - <http url="${node1.http.url}"/> - </and> - </waitfor> - <fail message="Timeout waiting for nodes to start" if="cluster.timeout"/> + <server:start name="node1"/> <echo message="Nodes have started, waiting for cluster to stablize..."/> <!-- Need a custom condition that queries for the node membership == 2 --> @@ -702,8 +687,8 @@ <param name="cluster.includes.refid" value="apache_tomcat.cluster.includes"/> <param name="jboss-junit-configuration" value="Tomcat Clustering"/> </antcall> - <stop-jboss url="${node0.jndi.url}"/> - <stop-jboss url="${node1.jndi.url}"/> + <server:stop name="node0"/> + <server:stop name="node1"/> <apache location="${apache.location}" action-type="stop"/> </target> @@ -715,8 +700,10 @@ <target name="tests-clustering" description="Execute clustering tests requiring two nodes."> - <antcall target="tests-clustering-startup" /> - <antcall target="tests-clustering-wait" /> + <antcall target="tests-clustering-configure" inheritRefs="true"/> + + <server:start name="node0"/> + <server:start name="node1"/> <!-- Need a custom condition that queries for the node membership == 2 --> <echo message="Going to call target tests-clustering-unit"/> @@ -725,27 +712,31 @@ <param name="cluster.includes.refid" value="cluster.includes"/> <param name="jboss-junit-configuration" value="Default"/> </antcall> - <antcall target="tests-clustering-shutdown" /> + + <server:stop name="node0"/> + <server:stop name="node1"/> <sleep seconds="4"/> <echo message="Going to call target tests-clustering-unit again with new configuration"/> - <antcall target="tests-clustering-startup-with-config-change" /> - <antcall target="tests-clustering-wait" /> + <antcall target="tests-clustering-startup-with-config-change"/> + + <server:start name="node0"/> + <server:start name="node1"/> <antcall target="tests-clustering-unit"> <param name="cluster.includes.refid" value="cluster.includes"/> <param name="jboss-junit-configuration" value="SyncModeNUseJvm"/> </antcall> - <antcall target="tests-clustering-shutdown" /> + + <server:stop name="node0"/> + <server:stop name="node1"/> </target> - <target name="tests-clustering-startup" unless="${tests.clustering.skip.startup}"> + <target name="tests-clustering-configure" unless="${tests.clustering.skip.startup}"> <create-cluster-node conf="node0"/> - <start-jboss conf="node0" host="${node0}"/> <create-cluster-node conf="node1"/> - <start-jboss conf="node1" host="${node1}"/> </target> <target name="tests-clustering-startup-with-config-change" unless="${tests.clustering.skip.startup}"> @@ -755,26 +746,6 @@ <echo message="Modifying the node0 and node1 Tomcat configuration"/> <http-cluster-node-config-change conf="node0"/> <http-cluster-node-config-change conf="node1"/> - - <start-jboss conf="node0" host="${node0}"/> - <start-jboss conf="node1" host="${node1}"/> - </target> - - <target name="tests-clustering-shutdown" unless="${tests.clustering.skip.startup}"> - <stop-jboss url="${node0.jndi.url}"/> - <stop-jboss url="${node1.jndi.url}"/> - </target> - <target name="tests-clustering-wait" unless="${tests.clustering.skip.startup}"> - <echo message="Waiting for nodes to start..."/> - <waitfor maxwait="120" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="cluster.timeout"> - <and> - <http url="${node0.http.url}"/> - <http url="${node1.http.url}"/> - </and> - </waitfor> - <fail message="Timeout waiting for nodes to start" if="cluster.timeout"/> - <echo message="Nodes have started, waiting for cluster to stablize..."/> </target> <!-- Tests of tomcat needing a ssl connector @@ -790,8 +761,9 @@ <include name="lib/**"/> </patternset> </create-config> - <start-jboss conf="tomcat-ssl"/> - <wait-on-host/> + + <server:start name="tomcat-ssl"/> + <!-- Specify the JSSE properties --> <property name="javax.net.ssl.keyStore" value="${build.resources}/test-configs/tomcat-ssl/conf/client.keystore"/> @@ -805,8 +777,8 @@ </propertyset> <run-junit junit.patternset="tc-ssl.includes" junit.syspropertyset="tomcat-ssl-tests-props" /> - <stop-jboss/> - <wait-on-shutdown conf="tomcat-ssl"/> + + <server:stop name="tomcat-ssl"/> </target> <!-- Tests of tomcat requiring SSO configured @@ -828,11 +800,9 @@ <include name="lib/**"/> </patternset> </create-config> - <start-jboss conf="tomcat-sso"/> - <wait-on-host/> + <server:start name="tomcat-sso"/> <run-junit junit.patternset="tc-sso.includes" /> - <stop-jboss/> - <wait-on-shutdown conf="tomcat-sso"/> + <server:stop name="tomcat-sso"/> </target> <target name="tomcat-sso-clustered-tests" @@ -872,16 +842,8 @@ </patternset> </create-config> - <start-jboss conf="tomcat-sso-cluster0" host="${node0}"/> - <start-jboss conf="tomcat-sso-cluster1" host="${node1}"/> - <waitfor maxwait="120" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="cluster.timeout"> - <and> - <http url="${node0.http.url}"/> - <http url="${node1.http.url}"/> - </and> - </waitfor> - <fail message="Timeout waiting for nodes to start" if="cluster.timeout"/> + <server:start name="tomcat-sso-cluster0"/> + <server:start name="tomcat-sso-cluster1"/> <echo message="Nodes have started, waiting for cluster to stablize..."/> <sleep seconds="10" /> <antcall target="tests-clustering-unit"> @@ -889,10 +851,8 @@ <param name="jboss-junit-configuration" value="tomcat-sso-cluster"/> </antcall> - <stop-jboss url="${node0.jndi.url}"/> - <stop-jboss url="${node1.jndi.url}"/> - <wait-on-shutdown conf="tomcat-sso-cluster0"/> - <wait-on-shutdown conf="tomcat-sso-cluster1"/> + <server:stop name="tomcat-sso-cluster0"/> + <server:stop name="tomcat-sso-cluster1"/> </target> <!-- DTM two-phase commit tests --> @@ -973,30 +933,20 @@ </fileset> </copy> <!-- 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"/> + <server:start name="dtm0"/> + <server:start name="dtm1"/> + <server:start name="dtm2"/> + <server:start name="dtm3"/> + <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"/> + <server:stop name="dtm0"/> + <server:stop name="dtm1"/> + <server:stop name="dtm2"/> + <server:stop name="dtm3"/> </target> <!-- DTM unit tests --> @@ -1079,27 +1029,13 @@ > <create-all-cluster-node conf="binding-manager1" ports="ports-01"/> <create-all-cluster-node conf="binding-manager2" ports="ports-02"/> - <start-jboss conf="binding-manager1"/> - <echo>Waiting for http://localhost:8180</echo> - <waitfor maxwait="300" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="cluster.timeout"> - <and> - <http url="http://localhost:8180"/> - </and> - </waitfor> - <fail message="Timeout waiting for binding-manager1 to start" if="cluster.timeout"/> - <start-jboss conf="binding-manager2"/> - <echo>Waiting for http://localhost:8280</echo> - <waitfor maxwait="300" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="cluster.timeout"> - <and> - <http url="http://localhost:8280"/> - </and> - </waitfor> - <fail message="Timeout waiting for binding-manager2 to start" if="cluster.timeout"/> + <server:start name="binding-manager1"/> + <server:start name="binding-manager2"/> + <run-junit junit.patternset="binding-manager.includes" /> - <stop-jboss url="jnp://localhost:1299"/> - <stop-jboss url="jnp://localhost:1199"/> + + <server:stop name="binding-manager1"/> + <server:stop name="binding-manager2"/> </target> <!-- @@ -1115,13 +1051,12 @@ <include name="lib/**"/> </patternset> </create-config> - <start-jboss conf="jrmp-invoker"/> - <wait-on-host/> + <server:start name="jrmp-invoker"/> <run-junit junit.patternset="jrmp-invoker.includes" junit.configuration="JRMP-Invoker" /> - <stop-jboss/> + <server:stop name="jrmp-invoker"/> </target> <!-- @@ -1152,13 +1087,11 @@ <include name="deployment-service.sar"/> </fileset> </copy> - <start-jboss-os conf="deployment-service"/> - <wait-on-host/> + <server:start name="deployment-service"/> <antcall target="deployment-service-unit-tests"> <param name="jboss-junit-configuration" value="DeploymentService"/> </antcall> - <stop-jboss/> - <wait-on-shutdown conf="deployment-service"/> + <server:stop name="deployment-service"/> </target> <target name="deployment-service-unit-tests"> @@ -1331,11 +1264,6 @@ </fileset> </batchtest> </junit> - <antcall target="cleanup-clustering"></antcall> - </target> - <!-- Target stops the cluster when junit fails.--> - <target name="cleanup-clustering" if="test.failure"> - <stop-cluster/> </target> <target name="tests-ha-unit"> @@ -1453,24 +1381,13 @@ <!-- Tests of Java2 permissions. The JBoss server must be running with a security manager for this test --> - <target name="tests-security-manager" depends="serverTaskdefs" + <target name="tests-security-manager" description="Tests run against a jboss server with a security manager"> <echo message="Starting default with policy ${build.resources}/securitymgr/server.policy" /> <echo message="jboss.home.dir=${jboss.dist}" /> <echo message="jboss.server.home.dir=${jboss.dist}${/}server${/}default" /> - <server:config javaHome="${env.JAVA_HOME}" jbossHome="${jboss.dist}"> - <server name="securitymgr" config="default" host="${node0}"> - <jvmarg value="${jpda.cmdline}" /> - <jvmarg value="-Xmx64m" /> - <jvmarg value="-Djboss.home.dir=${jboss.dist}" /> - <jvmarg value="-Djboss.server.home.dir=${jboss.dist}${/}server${/}default" /> - <jvmarg value="-Djava.security.manager"/> - <jvmarg value="-Djava.security.policy==${build.resources}/securitymgr/server.policy"/> - <jvmarg value="-Djava.security.debug=failure"/> - </server> - </server:config> <server:start name="securitymgr"/> <junit dir="${module.output}" @@ -1541,15 +1458,10 @@ <include name="lib/**"/> </patternset> </create-config> - <start-jboss conf="jacc"/> + <server:start name="jacc"/> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> - <waitfor maxwait="60" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout"> - <http url="http://${node0}:8080/"/> - </waitfor> - <fail message="Timeout waiting for server to start" if="startup.timeout"/> <property name="jbosstest.secure" value="true"/> <property name="java.security.auth.login.config" @@ -1561,14 +1473,13 @@ <run-junit junit.patternset="jacc.includes" junit.syspropertyset="jacc-tests-props" /> - <stop-jboss/> - <wait-on-shutdown conf="jacc"/> + <server:stop name="jacc"/> </target> <target name="tests-jacc-securitymgr" description="Tests run against a jboss server with JACC configured + security manager"> <!-- Create the ssl enabled tomcat config --> - <create-config baseconf="default" newconf="jacc"> + <create-config baseconf="default" newconf="jacc-securitymgr"> <patternset> <include name="conf/**"/> <include name="deploy/hsqldb-ds.xml"/> @@ -1584,16 +1495,10 @@ <include name="lib/**"/> </patternset> </create-config> - <start-securitymgr conf="jacc"/> + <server:start name="jacc-securitymgr"/> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> - <waitfor maxwait="60" maxwaitunit="second" - checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout"> - <http url="http://${node0}:8080/"/> - </waitfor> - <fail message="Timeout waiting for server to start" if="startup.timeout"/> - <junit dir="${module.output}" printsummary="true" @@ -1647,8 +1552,7 @@ </batchtest> </junit> - <stop-jboss/> - <wait-on-shutdown conf="jacc"/> + <server:stop name="jacc-securitymgr"/> </target> <target name="tests-standalone-aop-unit"> @@ -2217,8 +2121,7 @@ <include name="**/*"/> </patternset> </create-config> - <start-jboss conf="webservice-ssl"/> - <wait-on-host/> + <server:start name="webservice-ssl"/> <!-- Specify the JSSE properties --> <property name="javax.net.ssl.keyStore" value="${build.resources}/test-configs/webservice-ssl/conf/client.keystore"/> @@ -2233,8 +2136,7 @@ </propertyset> <run-junit junit.patternset="webservice-ssl.includes" junit.syspropertyset="webservice-ssl-tests-props" /> - <stop-jboss/> - <wait-on-shutdown conf="webservice-ssl"/> + <server:stop name="webservice-ssl"/> </target> <!-- Test for JAXR under the Web Services Umbrella --> @@ -2654,9 +2556,11 @@ <target name="tests-jboss-cluster" description="Test that two jboss cluster nodes can be started/stopped from ant"> - <start-cluster/> + <server:start name="node0"/> + <server:start name="node1"/> <start-sleep seconds="60"/> - <stop-cluster/> + <server:stop name="node0"/> + <server:stop name="node1"/> </target> <!-- Reporting targets that generate reports from JUnit output. |