[jboss-cvs] JBossAS SVN: r67815 - in branches/JBoss_4_0_0_CP/testsuite: src/main/org/jboss/test/testbeancluster/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Dec 3 17:21:24 EST 2007


Author: jaroslaw.kijanowski
Date: 2007-12-03 17:21:23 -0500 (Mon, 03 Dec 2007)
New Revision: 67815

Modified:
   branches/JBoss_4_0_0_CP/testsuite/build.xml
   branches/JBoss_4_0_0_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java
Log:
fix clustering testsuite and BeanUnitTestCaseNew

Modified: branches/JBoss_4_0_0_CP/testsuite/build.xml
===================================================================
--- branches/JBoss_4_0_0_CP/testsuite/build.xml	2007-12-03 22:15:14 UTC (rev 67814)
+++ branches/JBoss_4_0_0_CP/testsuite/build.xml	2007-12-03 22:21:23 UTC (rev 67815)
@@ -69,6 +69,17 @@
        (and without typing -D each time they run it) -->
     <property file=".ant.properties"/>
 
+
+   <!-- Cluster node0 defaults -->
+   <property name="node0" value="localhost"/>
+   <property name="node0.http.url" value="http://${node0}:8080"/>
+   <property name="node0.jndi.url" value="jnp://${node0}:1099"/>
+   <!-- Cluster node1 defaults -->
+   <property name="node1" value="${hostname}"/>
+   <property name="node1.http.url" value="http://${node1}:8080"/>
+   <property name="node1.jndi.url" value="jnp://${node1}:1099"/>
+
+
     <!-- =================== -->
     <!-- Basic Configuration -->
     <!-- =================== -->
@@ -4999,6 +5010,40 @@
         <include name="**/*.xml"/>
       </fileset>
     </jar>
+      <jar destfile="${build.lib}/test-cif.jar">
+         <fileset dir="${build.classes}">
+            <include name="org/jboss/test/testbean/interfaces/AComplexPK.class"/>
+            <include name="org/jboss/test/testbeancluster/interfaces/**"/>
+            <include name="org/jboss/test/testbeancluster/bean/**"/>
+         </fileset>
+         <zipfileset dir="${build.resources}/testbeancluster"
+            fullpath="META-INF/ejb-jar.xml" includes="cif-ejb-jar.xml"/>
+         <zipfileset dir="${build.resources}/testbeancluster"
+            fullpath="META-INF/jboss.xml" includes="cif-jboss.xml"/>
+         <zipfileset dir="${build.resources}/testbeancluster"
+            fullpath="META-INF/jbosscmp-jdbc.xml" includes="jbosscmp-jdbc.xml"/>
+      </jar>
+      <ear destfile="${build.lib}/test-cif.ear"
+         appxml="${build.resources}/testbeancluster/application.xml">
+         <metainf dir="${build.resources}/testbeancluster">
+            <include name="jboss-app.xml"/>
+         </metainf>
+         <fileset dir="${build.lib}">
+            <include name="test-cif.jar"/>
+         </fileset>
+         <fileset dir="${build.resources}/testbeancluster">
+            <include name="cif-ds.xml"/>
+         </fileset>
+      </ear>
+    <jar destfile="${build.lib}/drm-tests.sar">
+      <metainf dir="${build.resources}/cluster/drm">
+        <include name="jboss-service.xml"/>
+      </metainf>
+      <fileset dir="${build.classes}">
+        <include name="org/jboss/test/cluster/drm/*"/>
+        <include name="org/jboss/test/cluster/test/*_Stub.class"/>
+      </fileset>
+    </jar>
   </target>
 
 	<!-- httpsessionreplication test -->
@@ -5849,9 +5894,34 @@
   </target>
 
   <target name="tests-clustering-noreport"
-    depends="init, tests-clustering-unit,tests-http-clustering-unit">
+    depends="init, setup, tests-clustering-unit,tests-http-clustering-unit, setdown">
   </target>
 
+  <target name="setup">
+      <create-cluster-node conf="node0"/>
+      <start-jboss conf="node0" host="${node0}"/>
+      <sleep seconds="90"/>
+      <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"/>
+      <echo message="Nodes have started, waiting for cluster to stablize..."/>
+
+  </target>
+  <target name="setdown">
+      <stop-jboss url="${node0.jndi.url}"/>
+      <stop-jboss url="${node1.jndi.url}"/>
+  </target>
+
+
+
   	<!-- HTTP Clustering Tests-->
  <target name="tests-http-clustering-noreport"
   	    depends="init, tests-http-clustering-unit">
@@ -6014,6 +6084,12 @@
       jvm="${junit.jvm}">
 
       <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+         <sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+         <sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
+         <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+         <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
       <sysproperty key="build.testlog" value="${build.testlog}"/>
       <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
 
@@ -6040,6 +6116,7 @@
 
         <fileset dir="${build.classes}">
           <include name="org/jboss/test/testbeancluster/**/*UnitTestCase*.class"/>
+          <include name="org/jboss/test/cluster/test/DRMTestCase.class"/>
         </fileset>
       </batchtest>
     </junit>
@@ -6095,6 +6172,12 @@
     	        	      jvm="${junit.jvm}">
 
     	        	      <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/>
+         <sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+         <sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
+         <sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+         <sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
+         <sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
     	        	      <sysproperty key="build.testlog" value="${build.testlog}"/>
     	        	      <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
 
@@ -7782,3 +7865,4 @@
     </target>
 
 </project>
+

Modified: branches/JBoss_4_0_0_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java
===================================================================
--- branches/JBoss_4_0_0_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java	2007-12-03 22:15:14 UTC (rev 67814)
+++ branches/JBoss_4_0_0_CP/testsuite/src/main/org/jboss/test/testbeancluster/test/BeanUnitTestCaseNew.java	2007-12-03 22:21:23 UTC (rev 67815)
@@ -87,7 +87,7 @@
       getLog().debug("");
       getLog().debug(++test+"- "+"Looking up the home nextgen.StatelessSession...");
       StatelessSessionHome  statelessSessionHome =
-      (StatelessSessionHome) ctx.lookup("nextgen.StatelessSession");
+      (StatelessSessionHome) ctx.lookup("nextgen_StatelessSession");
       if (statelessSessionHome!= null ) getLog().debug("ok");
       getLog().debug(++test+"- "+"Calling create on StatelessSessionHome...");
       StatelessSession statelessSession =
@@ -150,7 +150,7 @@
       getLog().debug("");
       getLog().debug(++test+"- "+"Looking up the home nextgen.StatefulSession...");
       StatefulSessionHome  statefulSessionHome =
-      (StatefulSessionHome) ctx.lookup("nextgen.StatefulSession");
+      (StatefulSessionHome) ctx.lookup("nextgen_StatefulSession");
       if (statefulSessionHome!= null ) getLog().debug("ok");
          getLog().debug(++test+"- "+"Calling create on StatefulSessionHome...");
       StatefulSession statefulSession =




More information about the jboss-cvs-commits mailing list