[jboss-jira] [JBoss JIRA] Commented: (JBAS-7537) allow find grained testing with server start/stop
Jonathan Halliday (JIRA)
jira-events at lists.jboss.org
Mon Dec 14 12:01:30 EST 2009
[ https://jira.jboss.org/jira/browse/JBAS-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12499818#action_12499818 ]
Jonathan Halliday commented on JBAS-7537:
-----------------------------------------
hmm, this approach seems to work:
Index: imports/server-config.xml
===================================================================
118a119,128
> <server name="generic" config="${generic.config}" host="${node0}" >
> <jvmarg value="-Xms128m" />
> <jvmarg value="-Xmx512m" />
> <jvmarg value="-XX:MaxPermSize=512m" />
> <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
> <jvmarg value="-XX:-UseGCOverheadLimit" />
> <sysproperty key="java.net.preferIPv4Stack" value="true" />
> <sysproperty key="java.endorsed.dirs" value="${jboss.dist}/lib/endorsed" />
> <sysproperty key="jgroups.udp.ip_ttl" value="${jbosstest.udp.ip_ttl}" />
> </server>
Index: build.xml
===================================================================
538a539
> <property name="generic.config" value="${server}"/>
3422a3424,3443
> <!-- run a specific group of tests using the specified server e.g.
> ./build.sh -Dserver=default -Dtest=tm test-with-server -->
> <target name="test-with-server" if="server" depends="init"
> description="Execute a single test group with specified server config startup/shutdown">
> <echo message="starting server ${server}"/>
> <server:start name="generic"/>
> <antcall target="test" inheritRefs="true"/>
> <server:stop name="generic"/>
> </target>
>
> <!-- run a specific test using the specified server e.g.
> ./build.sh -Dserver=default -Dtest=org.jboss.test.tm.test.TransactionLocalUnitTestCase one-test-with-server -->
> <target name="one-test-with-server" if="server" depends="init"
> description="Execute a single test with specified server config startup/shutdown">
> <echo message="starting server ${server}"/>
> <server:start name="generic"/>
> <antcall target="one-test" inheritRefs="true"/>
> <server:stop name="generic"/>
> </target>
>
> allow find grained testing with server start/stop
> -------------------------------------------------
>
> Key: JBAS-7537
> URL: https://jira.jboss.org/jira/browse/JBAS-7537
> Project: JBoss Application Server
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Test Suite
> Affects Versions: JBossAS-6.0.0.M1
> Reporter: Jonathan Halliday
> Assignee: Shelly McGowan
> Fix For: JBossAS-6.0.0.M2
>
>
> I wish to be able to configure hudson runs that smoke test using a given group or groups of tests. When testing interactively, the process is:
> (start desired server in another shell)
> cd testsuite; ./build.sh -Dtest=foo test
> (stop server)
> However, I'd like to be able to do this as a single command, so it can be easily automated in hudson runs.
> Suggested approach:
> testsuite/build.xml:
> <target name="test-with-server" if="server" depends="init"
> description="Execute a singe test with specified server config startup/shutdown">
> <server:start name="${server}"/>
> <antcall target="test" inheritRefs="true"/>
> <server:stop name="${server}"/>
> </target>
> and likewise for one-test.
> Whilst this change is minimal, making it work would also require fixing server:start so it does not incorrectly barf when passed an arg of "default":
> java.lang.IllegalArgumentException: There is no server named: default
> at org.jboss.jbossas.servermanager.ServerManager.getServer(ServerManager.java:124)
> at org.jboss.jbossas.servermanager.ServerManager.startServer(ServerManager.java:163)
> at org.jboss.ant.taskdefs.server.StartServerTask.startServer(StartServerTask.java:72)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list