[jboss-cvs] JBossAS SVN: r67536 - in branches/JBPAPP_4_2_0_GA_CP/ejb3: src/resources/test-configs and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 27 23:19:01 EST 2007


Author: bstansberry at jboss.com
Date: 2007-11-27 23:19:00 -0500 (Tue, 27 Nov 2007)
New Revision: 67536

Added:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test-configs/buddy-repl/
Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
Log:
[JBPAPP-295] Enable buddy replication tests

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml	2007-11-28 04:15:57 UTC (rev 67535)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/build-test.xml	2007-11-28 04:19:00 UTC (rev 67536)
@@ -3436,6 +3436,16 @@
             <isset property="test.jndi.url"/>
          </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"
@@ -3498,7 +3508,10 @@
 
          <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"/>
+         <!--formatter type="xml" extension="-${test.extension}.xml" usefile="true" if="test.extension"/-->
+         <sysproperty key="jboss-junit-configuration" value="${jboss-junit-configuration}"/>  
+         <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" 
+                    extension="-${test.extension}.xml" usefile="true" if="test.extension"/>
 
          <batchtest todir="${build.reports}"
             haltonerror="false"
@@ -4068,12 +4081,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-buddyrepl-test"/>
 
    </target>
 
@@ -4234,23 +4245,29 @@
    </target>
 
    <target name="test-cluster-session">
-      <antcall target="test-with-jvmargs" inheritRefs="true">
-         <param name="test" value="clusteredsession"/>
-         <param name="jvmargs" value=""/>
-         <!--
-         <param name="jvmargs"
-                value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=n,suspend=n"/>
-         -->
-      </antcall>
-      
-      <antcall target="test-with-jvmargs" inheritRefs="true">
-         <param name="test" value="ejbthree921"/>
-         <param name="jvmargs" value=""/>
-      </antcall>
+	         
+       <property name="buddy-replication-extension" value="BR-disabled"/> 
 	   
+	   <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"/>
+	      -->
+	   </antcall>
+	   
+	   <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>
+	   
       <antcall target="test-with-jvmargs" inheritRefs="true">
          <param name="test" value="ejbthree1136"/>
          <param name="jvmargs" value=""/>
+         <param name="test.extension" value="${buddy-replication-extension}"/> 
       </antcall>
 
    </target>
@@ -4418,6 +4435,7 @@
    <macrodef name="create-ejb3-cluster-node"
       description="Create a simplified cluster configuration for ejb3 testing">
       <attribute name="conf"/>
+      <attribute name="conf-src" description="The name of the tests-config to copy or the baseconf" default="@{conf}"/>
       <attribute name="host" default="${node0}"/>
       <attribute name="jboss.dist" default="${jboss.dist}"
          description="The jboss dist root directory" />
@@ -4433,6 +4451,10 @@
                <include name="deploy/ejb3-interceptors-aop.xml"/>
             </fileset>
          </copy>
+         <echo message="Overwriting config descriptors" />
+         <copy todir="@{jboss.dist}/server/@{conf}" overwrite="true" failonerror="false">
+            <fileset dir="${build.resources}/test-configs/@{conf-src}" />
+        </copy>
         <antcall target="modify-ejb3-repl_sync">
              <param name="file_" value="${jboss.dist}/server/@{conf}/deploy/ejb3-clustered-sfsbcache-service.xml"/>
         </antcall>
@@ -4446,6 +4468,27 @@
            replace="REPL_SYNC"/>
    </target>
 
+   <target name="clustered-buddyrepl-test">
+      <create-ejb3-cluster-node conf="clustered-ejb3-BR-0" conf-src="buddy-repl" jboss.dist="${ejb3.dist}"/>
+      <create-ejb3-cluster-node conf="clustered-ejb3-BR-1" conf-src="buddy-repl"  jboss.dist="${ejb3.dist}"/>
+
+      <start-jboss conf="clustered-ejb3-BR-0" host="${node0}" jvmargs="${ejb3.jboss.jvmargs} -Djgroups.bind_addr=${node0.jgroups.bind_addr}"/>
+      <start-jboss conf="clustered-ejb3-BR-1" host="${node1}" jvmargs="${ejb3.jboss.jvmargs} -Djgroups.bind_addr=${node1.jgroups.bind_addr}"/>
+
+      <antcall target="tests-clustering-wait"/>
+
+      <antcall target="test-cluster-session" inheritRefs="true">
+         <param name="buddy-replication-extension" value="BR-enabled"/>
+      </antcall>
+
+      <stop-jboss url="${node0.jndi.url}"/>
+      <stop-jboss url="${node1.jndi.url}"/>
+   	
+      <wait-on-shutdown conf="clustered-ejb3-BR-0"/>
+      <wait-on-shutdown conf="clustered-ejb3-BR-1"/>
+
+   </target>
+
    <target name="tests-clustering-startup" unless="${tests.clustering.skip.startup}">
       <create-ejb3-cluster-node conf="node0" jboss.dist="${ejb3.dist}"/>
       <start-jboss conf="node0" host="${node0}" jboss.dist="${ejb3.dist}" jvmargs="${ejb3.jboss.jvmargs} -Djgroups.bind_addr=${node0.jgroups.bind_addr}"/>

Copied: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/resources/test-configs/buddy-repl (from rev 67533, branches/JBPAPP_4_2/ejb3/src/resources/test-configs/buddy-repl)




More information about the jboss-cvs-commits mailing list