[jboss-cvs] JBossAS SVN: r64955 - trunk/ejb3.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 29 12:41:52 EDT 2007
Author: bstansberry at jboss.com
Date: 2007-08-29 12:41:52 -0400 (Wed, 29 Aug 2007)
New Revision: 64955
Modified:
trunk/ejb3/build-test.xml
Log:
[EJBTHREE-1013] Run clustered session tests with buddy replication enabled and disabled
Modified: trunk/ejb3/build-test.xml
===================================================================
--- trunk/ejb3/build-test.xml 2007-08-29 16:13:56 UTC (rev 64954)
+++ trunk/ejb3/build-test.xml 2007-08-29 16:41:52 UTC (rev 64955)
@@ -3687,6 +3687,16 @@
</not>
</condition>
+ <condition property="jboss-junit-configuration" value="${test.extension}">
+ <isset property="test.extension"/>
+ </condition>
+
+ <condition property="jboss-junit-configuration" value="">
+ <not>
+ <isset property="test.extension"/>
+ </not>
+ </condition>
+
<junit dir="${module.output}"
printsummary="yes"
haltonerror="false"
@@ -3762,7 +3772,9 @@
<formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true" unless="test.extension"/>
- <formatter type="xml" extension="-${test.extension}.xml" usefile="true" if="test.extension"/>
+ <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>
+ <formatter type="xml" classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-${test.extension}.xml" usefile="true" if="test.extension"/>
<batchtest todir="${build.reports}"
haltonerror="false"
@@ -4684,12 +4696,10 @@
<antcall target="test-clustered-entity"/>
<antcall target="test-cluster-session"/>
- <!--
- Test in test-cluster-session shuts down both nodes. It needs to shut down one
- anyway as part of the tests, so simplest is to shut down the other from within
- the test rather than figure out what to shut down here.
- -->
<antcall target="tests-clustering-shutdown"/>
+
+ <!-- Rerun the tests with buddy replication turned off -->
+ <antcall target="clustered-no-buddyrepl-test"/>
</target>
@@ -4828,9 +4838,13 @@
</target>
<target name="test-cluster-session">
+
+ <property name="buddy-replication-extension" value="BR-enabled"/>
+
<antcall target="test-with-jvmargs" inheritRefs="true">
<param name="test" value="clusteredsession"/>
<param name="jvmargs" value=""/>
+ <param name="test.extension" value="${buddy-replication-extension}"/>
<!--
<param name="jvmargs"
value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=n,suspend=n"/>
@@ -4839,6 +4853,7 @@
<antcall target="test-with-jvmargs" inheritRefs="true">
<param name="test" value="ejbthree921"/>
<param name="jvmargs" value=""/>
+ <param name="test.extension" value="${buddy-replication-extension}"/>
</antcall>
</target>
@@ -4929,6 +4944,39 @@
<wait-on-shutdown conf="clusteredjms2"/>
</target>
+ <!-- A macro for turning off buddy replication in a node -->
+ <macrodef name="buddy-repl-config-change">
+ <attribute name="conf"/>
+ <attribute name="useBuddyRepl" default="false"/>
+ <sequential>
+ <echo message="Disabling EJB3 SFSB buddy replication in ${jboss.dist}/server/@{conf}"/>
+ <!-- Toggle buddy replication in jboss-web-cluster-beans.xml -->
+ <replace file="${jboss.dist}/server/@{conf}/deploy/ejb3-clustered-sfsbcache-beans.xml"
+ token="<property name="enabled">true" value="<property name="enabled">@{useBuddyRepl}"/>
+ </sequential>
+ </macrodef>
+
+ <target name="clustered-no-buddyrepl-test">
+ <create-cluster-node conf="clustered-ejb3-noBR-0"/>
+ <create-cluster-node conf="clustered-ejb3-noBR-1"/>
+
+ <buddy-repl-config-change conf="clustered-ejb3-noBR-0"/>
+ <buddy-repl-config-change conf="clustered-ejb3-noBR-1"/>
+
+ <start-jboss conf="clustered-ejb3-noBR-0" host="${node0}" jvmargs="-Xmx512M"/>
+ <start-jboss conf="clustered-ejb3-noBR-1" host="${node1}" jvmargs="-Xmx512M"/>
+
+ <antcall target="tests-clustering-wait"/>
+
+ <antcall target="test-cluster-session" inheritRefs="true">
+ <param name="buddy-replication-extension" value="BR-disabled"/>
+ </antcall>
+
+ <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="240" maxwaitunit="second"
@@ -4956,10 +5004,15 @@
</target>
<target name="tests-clustering-startup" unless="${tests.clustering.skip.startup}">
+
+ <!-- Caller can pass in the node names; if not these are the defaults -->
+ <property name="first-node" value="node0"/>
+ <property name="second-node" value="node1"/>
+
<create-cluster-node conf="node0"/>
- <start-jboss conf="node0" host="${node0}" jvmargs="-Xmx128M"/>
- <create-cluster-node conf="node1"/>
- <start-jboss conf="node1" host="${node1}" jvmargs="-Xmx128M"/>
+ <start-jboss conf="${first-node}" host="${node0}" jvmargs="-Xmx128M"/>
+ <create-cluster-node conf="${second-node}"/>
+ <start-jboss conf="${second-node}" host="${node1}" jvmargs="-Xmx128M"/>
</target>
<target name="tests-clustering-shutdown" unless="${tests.clustering.skip.startup}">
More information about the jboss-cvs-commits
mailing list