[jboss-cvs] JBossAS SVN: r102952 - in branches/JBPAPP_5_0/testsuite: src/main/org/jboss/test/crashrecovery/ASCrashRecovery01 and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 25 06:47:37 EDT 2010


Author: istudens at redhat.com
Date: 2010-03-25 06:47:37 -0400 (Thu, 25 Mar 2010)
New Revision: 102952

Added:
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-1-xa-ds.xml
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-2-xa-ds.xml
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-lb-xa-ds.xml
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle11-r2-xa-ds.xml
Removed:
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/sybase12-xa-ds.xml
Modified:
   branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
   branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/ASCrashRecovery01/TestWithJPA.java
   branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml
Log:
refactored to run all testcases in one AS server instance, added oracle11gR2, 11gR2 RAC - JBQA-2176

Modified: branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml	2010-03-25 10:29:32 UTC (rev 102951)
+++ branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -86,9 +86,11 @@
             <sysproperty key="testTime" value="${crash.max.time}" />
             <env key="JBOSS_HOME" value="${jbosstest.dist}" />
             <!--arg value="-verbose"/-->
-         	<arg value="-f"/>
+            <arg value="-f"/>
             <arg value="${build.resources}/${jbossts.crash.recovery.test.script.dir}/as-tests.xml"/>
             <arg value="@{target}"/>
+            <!--jvmarg value="-Xdebug"/>
+            <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/-->
          </java>
       </sequential>
    </macrodef>

Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/ASCrashRecovery01/TestWithJPA.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/ASCrashRecovery01/TestWithJPA.java	2010-03-25 10:29:32 UTC (rev 102951)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/ASCrashRecovery01/TestWithJPA.java	2010-03-25 10:47:37 UTC (rev 102952)
@@ -428,10 +428,13 @@
       int pendingUids;
       int pendingXidsInDoubt;
       int totalExistingXidsInDoubt = existingXidsInDoubt.size();
-      
-      // wait for the server to start up the first time through, we will need it for later database checking
-      suspendFor(2000);   // a little waiting is needed sometimes in order to be able to start server again, 2 secs
-      config.startServer(serverName);
+   
+      if (expectFailure)
+      {
+         // wait for the server to start up the first time through, we will need it for later database checking
+         suspendFor(2000);   // short waiting is needed sometimes in order to be able to start server again, 2 secs
+         config.startServer(serverName);
+      }
 
       do
       {

Added: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-1-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-1-xa-ds.xml	                        (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-1-xa-ds.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION:  DO NOT FORGET TO SET Pad=true IN transaction-service.xml  -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+  <xa-datasource>
+    <jndi-name>CrashRecoveryDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg27-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+    <xa-datasource-property name="User">crashrec</xa-datasource-property>
+    <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+    <no-tx-separate-pools/>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+</datasources>

Added: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-2-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-2-xa-ds.xml	                        (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-2-xa-ds.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION:  DO NOT FORGET TO SET Pad=true IN transaction-service.xml  -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+  <xa-datasource>
+    <jndi-name>RecoveryDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg28-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+    <xa-datasource-property name="User">crashrec</xa-datasource-property>
+    <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+    <no-tx-separate-pools/>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+</datasources>

Added: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-lb-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-lb-xa-ds.xml	                        (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac-r2-lb-xa-ds.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION:  DO NOT FORGET TO SET Pad=true IN transaction-service.xml  -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+  <xa-datasource>
+    <jndi-name>CrashRecoveryDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=vmg27-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=vmg28-vip.mw.lab.eng.bos.redhat.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+    <xa-datasource-property name="User">crashrec</xa-datasource-property>
+    <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+    <no-tx-separate-pools/>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+</datasources>

Added: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle11-r2-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle11-r2-xa-ds.xml	                        (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle11-r2-xa-ds.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  JBoss Server Configuration                                           -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: oracle-xa-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
+
+<!-- ===================================================================== -->
+<!-- ATTENTION:  DO NOT FORGET TO SET Pad=true IN transaction-service.xml  -->
+<!-- ===================================================================== -->
+
+<datasources>
+
+  <xa-datasource>
+    <jndi-name>CrashRecoveryDS</jndi-name>
+    <track-connection-by-tx>true</track-connection-by-tx> 
+    <isSameRM-override-value>false</isSameRM-override-value>
+    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
+    <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vmg27-vip.mw.lab.eng.bos.redhat.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=qarac.jboss)))</xa-datasource-property>
+    <xa-datasource-property name="User">crashrec</xa-datasource-property>
+    <xa-datasource-property name="Password">crashrec</xa-datasource-property>
+    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
+    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
+    <!-- Checks the Oracle error codes and messages for fatal errors -->
+    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
+    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
+    <no-tx-separate-pools/>
+
+      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+      <metadata>
+         <type-mapping>Oracle9i</type-mapping>
+      </metadata>
+  </xa-datasource>
+
+</datasources>

Deleted: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/sybase12-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/sybase12-xa-ds.xml	2010-03-25 10:29:32 UTC (rev 102951)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/sybase12-xa-ds.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  JBoss Server Configuration                                           -->
-<!-- Thanks to kosulin in the forumns                                      -->
-<!-- ===================================================================== -->
-
-<!-- $Id: sybase-xa-ds.xml 85945 2009-03-16 19:45:12Z dimitris at jboss.org $ -->
-
-<datasources>
-
-   <xa-datasource>
-     <jndi-name>CrashRecoveryDS</jndi-name>
-     <!-- uncomment to enable interleaving <interleaving/> -->
-     <xa-datasource-class>com.sybase.jdbc3.jdbc.SybXADataSource</xa-datasource-class>
-     <xa-datasource-property name="NetworkProtocol">Tds</xa-datasource-property>
-     <xa-datasource-property name="ServerName">dev01.qa.atl.jboss.com</xa-datasource-property>
-     <xa-datasource-property name="PortNumber">4100</xa-datasource-property>
-     <xa-datasource-property name="DatabaseName">crashrec</xa-datasource-property>
-     <xa-datasource-property name="User">crashrec</xa-datasource-property>
-     <xa-datasource-property name="Password">crashrec</xa-datasource-property>
-     <min-pool-size>1</min-pool-size>
-     <max-pool-size>20</max-pool-size>
-     <idle-timeout-minutes>15</idle-timeout-minutes>
-     <!--check-valid-connection-sql>select 1 from mytable</check-valid-connection-sql-->
-     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter</exception-sorter-class-name>
-     <type-mapping>Sybase</type-mapping>
-
-   </xa-datasource>
-
-</datasources>

Modified: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml	2010-03-25 10:29:32 UTC (rev 102951)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml	2010-03-25 10:47:37 UTC (rev 102952)
@@ -44,11 +44,11 @@
     -->
   <target name="crash-tests" depends="want-all-dbs, want-all-tstypes, want-all-tsdemarc, want-all-testcases, crash-tests-single" />
   
-  <target name="crash-tests-single-db" depends="set-db, want-all-tstypes, want-all-tsdemarc, want-all-testcases, crash-tests-single" />
+  <target name="crash-tests-single-db" depends="want-all-tstypes, want-all-tsdemarc, want-all-testcases, crash-tests-single" />
 
-  <target name="crash-tests-single-db-tstype" depends="set-db, set-tstype, want-all-tsdemarc, want-all-testcases, crash-tests-single" />
+  <target name="crash-tests-single-db-tstype" depends="want-all-tsdemarc, want-all-testcases, crash-tests-single" />
   
-  <target name="crash-tests-single" depends="init, prepare-drivers, set-db, set-tstype, set-tsdemarc, set-testcase, crash-tests-tstype-jta, crash-tests-tstype-jts" />
+  <target name="crash-tests-single" depends="init, set-db, prepare-drivers, set-tstype, set-tsdemarc, set-testcase, crash-tests-tstype-jta, crash-tests-tstype-jts" />
 
 
   <!--
@@ -74,6 +74,9 @@
     <condition property="want.oracle_11">
        <equals arg1="${crash.db}" arg2="oracle_11"/>
     </condition>
+    <condition property="want.oracle_11_r2">
+       <equals arg1="${crash.db}" arg2="oracle_11_r2"/>
+    </condition>
     <condition property="want.db2_9.7">
        <equals arg1="${crash.db}" arg2="db2_9.7"/>
     </condition>
@@ -95,6 +98,12 @@
     <condition property="want.oracle_rac_lb">
        <equals arg1="${crash.db}" arg2="oracle_rac_lb"/>
     </condition>
+    <condition property="want.oracle_rac_r2">
+       <equals arg1="${crash.db}" arg2="oracle_rac_r2"/>
+    </condition>
+    <condition property="want.oracle_rac_r2_lb">
+       <equals arg1="${crash.db}" arg2="oracle_rac_r2_lb"/>
+    </condition>
   </target>
 	
   <target name="want-all-dbs">
@@ -103,13 +112,16 @@
   	<property name="want.sybase_15" value="true" />
   	<property name="want.oracle_10" value="true" />
   	<property name="want.oracle_11" value="true" />
+  	<property name="want.oracle_11_r2" value="true" />
   	<property name="want.db2_9.7" value="true" />
   	<property name="want.mysql_5.0" value="true" />
   	<property name="want.mysql_5.1" value="true" />
   	<property name="want.mssql_2005" value="true" />
   	<property name="want.mssql_2008" value="true" />
-  	<!-- DEPRECATED property name="want.sybase_12" value="true" /-->
-  	<!-- DEPRECATED property name="want.db2_8.2" value="true" /-->
+  	<property name="want.oracle_rac" value="true" />
+  	<property name="want.oracle_rac_lb" value="true" />
+  	<property name="want.oracle_rac_r2" value="true" />
+  	<property name="want.oracle_rac_r2_lb" value="true" />
   </target>
 
   <target name="set-tstype">
@@ -189,6 +201,7 @@
   	<antcall target="call-tests-for-psql_8.3"/>
   	<antcall target="call-tests-for-oracle_10"/>
   	<antcall target="call-tests-for-oracle_11"/>
+  	<antcall target="call-tests-for-oracle_11_r2"/>
   	<antcall target="call-tests-for-mssql_2005"/>
   	<antcall target="call-tests-for-mssql_2008"/>
   	<antcall target="call-tests-for-mysql_5.0"/>
@@ -197,6 +210,8 @@
   	<antcall target="call-tests-for-sybase_15"/>
   	<antcall target="call-tests-for-oracle_rac"/>
   	<antcall target="call-tests-for-oracle_rac_lb"/>
+  	<antcall target="call-tests-for-oracle_rac_r2"/>
+  	<antcall target="call-tests-for-oracle_rac_r2_lb"/>
   </target>
 
   <target name="call-tests-for-psql_8.2" if="want.psql_8.2">
@@ -216,7 +231,7 @@
   </target>
 
   <target name="call-tests-for-oracle_10" if="want.oracle_10">
-  	<antcall target="${call.target}">
+    <antcall target="${call.target}">
   	  <param name="dbdriver" value="ojdbc14.jar"/>
   	  <param name="datasource" value="oracle10-xa-ds.xml" /> 
    	  <param name="dbname" value="oracle10" /> 
@@ -231,6 +246,14 @@
     </antcall>
   </target>
 
+  <target name="call-tests-for-oracle_11_r2" if="want.oracle_11_r2">
+  	<antcall target="${call.target}">
+  	  <param name="dbdriver" value="ojdbc6.jar"/>
+  	  <param name="datasource" value="oracle11-r2-xa-ds.xml" />
+   	  <param name="dbname" value="oracle11_r2" />
+    </antcall>
+  </target>
+
   <target name="call-tests-for-oracle_rac" if="want.oracle_rac">
   	<antcall target="${call.target}">
   	  <param name="dbdriver" value="ojdbc6.jar"/>
@@ -247,6 +270,22 @@
     </antcall>
   </target>
 
+  <target name="call-tests-for-oracle_rac_r2" if="want.oracle_rac_r2">
+  	<antcall target="${call.target}">
+  	  <param name="dbdriver" value="ojdbc6.jar"/>
+  	  <param name="datasource" value="oracle-rac-r2-1-xa-ds.xml" /> 
+   	  <param name="dbname" value="oracle_rac_r2" /> 
+    </antcall>
+  </target>
+
+  <target name="call-tests-for-oracle_rac_r2_lb" if="want.oracle_rac_r2_lb">
+  	<antcall target="${call.target}">
+  	  <param name="dbdriver" value="ojdbc6.jar"/>
+  	  <param name="datasource" value="oracle-rac-r2-lb-xa-ds.xml" /> 
+   	  <param name="dbname" value="oracle_rac_r2_lb" /> 
+    </antcall>
+  </target>
+
   <target name="call-tests-for-mssql_2005" if="want.mssql_2005">
   	<antcall target="${call.target}">
   	  <param name="dbdriver" value="sqljdbc4.jar"/>
@@ -265,7 +304,7 @@
   	
   <target name="call-tests-for-mysql_5.0" if="want.mysql_5.0">
   	<antcall target="${call.target}">
-  	  <param name="dbdriver" value="mysql-connector-java-5.0.8.jar"/>
+  	  <param name="dbdriver" value="mysql-connector-java-5.0.jar"/>
   	  <param name="datasource" value="mysql50-xa-ds.xml" /> 
    	  <param name="dbname" value="mysql50" /> 
     </antcall>
@@ -273,20 +312,12 @@
 	             
   <target name="call-tests-for-mysql_5.1" if="want.mysql_5.1">
   	<antcall target="${call.target}">
-  	  <param name="dbdriver" value="mysql-connector-java-5.1.7.jar"/>
+  	  <param name="dbdriver" value="mysql-connector-java-5.1.jar"/>
   	  <param name="datasource" value="mysql51-xa-ds.xml" /> 
    	  <param name="dbname" value="mysql51" /> 
     </antcall>
   </target>
 
-  <target name="call-tests-for-db2_8.2" if="want.db2_8.2">
-  	<antcall target="${call.target}">
-  	  <param name="dbdriver" value="DB2_v8.2_fp14/db2jcc*.jar"/>
-  	  <param name="datasource" value="db2_82-xa-ds.xml" /> 
-   	  <param name="dbname" value="db2_82" /> 
-    </antcall>
-  </target>
-	  	
   <target name="call-tests-for-db2_9.7" if="want.db2_9.7">
   	<antcall target="${call.target}">
   	  <param name="dbdriver" value="db2jcc.jar" />
@@ -295,14 +326,6 @@
     </antcall>
   </target>
 	  	
-  <target name="call-tests-for-sybase_12" if="want.sybase_12">
-  	<antcall target="${call.target}">
-  	  <param name="dbdriver" value="jconn3.jar"/>
-  	  <param name="datasource" value="sybase12-xa-ds.xml" /> 
-   	  <param name="dbname" value="sybase12" /> 
-    </antcall>
-  </target>
-
   <target name="call-tests-for-sybase_15" if="want.sybase_15">
   	<antcall target="${call.target}">
   	  <param name="dbdriver" value="jconn3.jar"/>
@@ -312,9 +335,8 @@
   </target>
 
 
+  <target name="crash-tests-for-database" depends="hack-before-astest-run, start-appserver-for-crash-tests, crash-tests-for-database-cmt, crash-tests-for-database-bmt, hack-after-astest-run" />
 
-  <target name="crash-tests-for-database" depends="crash-tests-for-database-cmt, crash-tests-for-database-bmt" />
-
   <target name="crash-tests-for-database-cmt" if="want.cmt">
     <antcall target="crash-tests-all-testcases"><param name="cmt" value="true" /></antcall>
   </target>
@@ -327,63 +349,95 @@
   <target name="crash-tests-all-testcases" 
   		depends="testcase-none,
   		         testcase-none-rev,
-  				 testcase-prepare_ex, 
+                 testcase-prepare_ex, 
   		         testcase-prepare_ex-rev, 
   		         testcase-prepare_halt, 
   		         testcase-prepare_halt-rev, 
   		         testcase-commit_halt-rev" />
 
   <target name="testcase-none" if="want.none">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
             <param name="specs" value="none"/><param name="reverseOrder" value="false"/><param name="rollbackExpected" value="false"/>
         </antcall>
   </target>
 
   <target name="testcase-none-rev" if="want.none.rev">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="none"/><param name="reverseOrder" value="true"/><param name="rollbackExpected" value="false"/>
         </antcall>
   </target>
 
   <target name="testcase-prepare_ex" if="want.prepare_ex">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="prepare_ex"/><param name="reverseOrder" value="false"/><param name="rollbackExpected" value="true"/>
         </antcall>
   </target>
 
   <target name="testcase-prepare_ex-rev" if="want.prepare_ex.rev">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="prepare_ex"/><param name="reverseOrder" value="true"/><param name="rollbackExpected" value="true"/>
         </antcall>
   </target>
 
   <target name="testcase-prepare_halt" if="want.prepare_halt">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="prepare_halt"/><param name="reverseOrder" value="false"/><param name="rollbackExpected" value="true"/>
         </antcall>
   </target>
 
   <target name="testcase-prepare_halt-rev" if="want.prepare_halt.rev">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="prepare_halt"/><param name="reverseOrder" value="true"/><param name="rollbackExpected" value="true"/>
         </antcall>
   </target>
 
   <target name="testcase-commit_halt-rev" if="want.commit_halt.rev">
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="commit_halt"/><param name="reverseOrder" value="true"/><param name="rollbackExpected" value="false"/>
         </antcall>  	
   </target>
 
   <target name="testcase-commit_halt" if="want.commit_halt">
         <!-- DISABLED test-case: the test is invalid for the current version of JBossTS --> 
-        <antcall target="execute-crash-recovery-test">
+        <antcall target="crash-recovery-test">
         	<param name="specs" value="commit_halt"/><param name="reverseOrder" value="false"/><param name="rollbackExpected" value="false"/>
         </antcall>
   </target>
 
-  <target name="execute-crash-recovery-test" depends="hack-before-astest-run, crash-recovery-test, hack-after-astest-run" />
-  
+  <target name="start-appserver-for-crash-tests">
+      <condition property="astest.app.jar.name" value="${astest.alternative.jar.name}">
+        <isset property="astest.alternative.jar.name"/>
+      </condition>
+      <property name="astest.app.jar.name" value="${astest.jar.name}" />
+
+      <astest:server method="start" serverName="crashrecovery-${tstype}" >
+        <deploy from="dbdrivers/${dbdriver}" to="lib/${dbdriver}" />
+        <deploy from="resources/${datasource}" to="deploy/${datasource}" />
+        <deploy from="${astest.jar.deploy.dir}/${astest.app.jar.name}" to="deploy/${astest.app.jar.name}" />
+      </astest:server>
+  </target>
+
+  <target name="stop-appserver-for-crash-tests">
+      <astest:server method="stop" serverName="crashrecovery-${tstype}" >
+        <undeploy from="deploy/${astest.app.jar.name}" />
+        <undeploy from="deploy/${datasource}" />
+        <undeploy from="lib/${dbdriver}" />    	
+      </astest:server>
+      
+      <!-- archive the server log -->
+      <zip destfile="${jboss.home}/server/crashrecovery-${tstype}/log/server-${dbname}.log.zip">
+        <fileset file="${jboss.home}/server/crashrecovery-${tstype}/log/server.log"/>
+      </zip>
+      <delete file="${jboss.home}/server/crashrecovery-${tstype}/log/server.log"/>
+      <copy todir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store-${dbname}"> 
+        <fileset dir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store" />
+      </copy>
+      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store"/>
+      <!-- delete work and tmp dirs otherwise tests failed due to permgen space - FIXME is this the right way how to ensure that? -->
+      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/work"/>
+      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/tmp"/>
+  </target>
+
   <!--
     Note: If you want to wipe out txs in doubt before and after test you have to set property 'wipeOutTxsInDoubt' to true.
     -->
@@ -406,21 +460,11 @@
       </condition>
       <property name="testname" value="${tstype}-${specs}-${test.name.cmt}${test.name.reverseOrder}"/>
 
-      <condition property="astest.app.jar.name" value="${astest.alternative.jar.name}">
-        <isset property="astest.alternative.jar.name"/>
-      </condition>
-      <property name="astest.app.jar.name" value="${astest.jar.name}" />
-
       <condition property="storeType" value="StateManager/BasicAction/TwoPhaseCoordinator/ArjunaTransactionImple">
         <equals arg1="${tstype}" arg2="jts" />
       </condition>
       <property name="storeType" value="StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction" />
      
-      <astest:server method="start" serverName="crashrecovery-${tstype}" >
-        <deploy from="dbdrivers/${dbdriver}" to="lib/${dbdriver}" />
-        <deploy from="resources/${datasource}" to="deploy/${datasource}" />
-        <deploy from="${astest.jar.deploy.dir}/${astest.app.jar.name}" to="deploy/${astest.app.jar.name}" />
-      </astest:server>
       <astest:action abortOnFail="false" waitFor="10000" impl="org.jboss.test.crashrecovery.taskdefs.JUnitClientAction">
         <param key="testClass" value="org.jboss.test.crashrecovery.ASCrashRecovery01.TestWithJPA" />
         <param key="name" value="${dbname}-${testname}" />
@@ -436,97 +480,89 @@
         <param key="reportFile" value="${build.reports}/TEST-org.jboss.test.crashrecovery.ASCrashRecovery01.TestWithJPA-${dbname}-${testname}.xml" />
         <param key="testTime" value="${testTime}" />
       </astest:action>
-      <astest:server method="stop" serverName="crashrecovery-${tstype}" >
-        <undeploy from="deploy/${astest.app.jar.name}" />
-        <undeploy from="deploy/${datasource}" />
-        <undeploy from="lib/${dbdriver}" />    	
-      </astest:server>
       
-      <!-- archive the server log -->
-      <zip destfile="${jboss.home}/server/crashrecovery-${tstype}/log/server-${dbname}-${testname}.log.zip">
-   	    <fileset file="${jboss.home}/server/crashrecovery-${tstype}/log/server.log"/>
-   	  </zip>
-      <delete file="${jboss.home}/server/crashrecovery-${tstype}/log/server.log"/>
-      <copy todir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store-${dbname}-${testname}"> 
-        <fileset dir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store" />
-      </copy>
-      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/data/tx-object-store"/>
-      <!-- delete work and tmp dirs otherwise tests failed due to permgen space - FIXME is this the right way how to ensure that? -->
-      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/work"/>
-      <delete dir="${jboss.home}/server/crashrecovery-${tstype}/tmp"/>
-      
     </sequential>
   </target>
 
-  <target name="hack-before-astest-run" depends="hack-before-astest-run-for-db2_9.7, hack-before-astest-run-for-oracle_rac" />
+  <target name="hack-before-astest-run" depends="hack-before-astest-run-for-db2_9.7, hack-before-astest-run-for-oracle_rac, hack-before-astest-run-for-oracle_rac_r2" />
   
-  <target name="hack-after-astest-run" depends="hack-after-astest-run-for-db2_9.7, hack-after-astest-run-for-oracle_rac" />
+  <target name="hack-after-astest-run" depends="hack-after-astest-run-for-db2_9.7, hack-after-astest-run-for-oracle_rac, hack-after-astest-run-for-oracle_rac_r2" />
   
   <target name="hack-before-astest-run-for-db2_9.7" if="want.db2_9.7">
-  	<!-- deploy license .jar file  -->
-  	<copy file="${product.dir}/dbdrivers/db2jcc_license_cu.jar" todir="${jboss.home}/server/crashrecovery-${tstype}/lib" />
+    <!-- deploy license .jar file  -->
+    <copy file="${product.dir}/dbdrivers/db2jcc_license_cu.jar" todir="${jboss.home}/server/crashrecovery-${tstype}/lib" />
+    <!-- prepare hacked astest jar -->
+    <property name="astest.alternative.jar.name" value="db2-${astest.jar.name}" />
   	
-  	<!-- prepare hacked astest jar -->
-  	<property name="astest.alternative.jar.name" value="db2-${astest.jar.name}" />
-  	
-  	<available file="${astest.jar.dir}/${astest.alternative.jar.name}" 
+    <available file="${astest.jar.dir}/${astest.alternative.jar.name}" 
   	    property="have.db2.astest.alternative.jar" />
-    <antcall target="prepare-db2-alternative-jar" />
-  	    
+    <antcall target="prepare-db2-alternative-jar" />	    
   </target>
   
   <target name="prepare-db2-alternative-jar" unless="have.db2.astest.alternative.jar">
-  	<mkdir dir="${astest.jar.dir}/${astest.alternative.jar.name}_content"/>
-  	<unjar src="${astest.jar.dir}/${astest.jar.name}" dest="${astest.jar.dir}/${astest.alternative.jar.name}_content" />
-  	<available file="${astest.jar.dir}/${astest.alternative.jar.name}_content/META-INF/persistence.xml" 
+    <mkdir dir="${astest.jar.dir}/${astest.alternative.jar.name}_content"/>
+    <unjar src="${astest.jar.dir}/${astest.jar.name}" dest="${astest.jar.dir}/${astest.alternative.jar.name}_content" />
+    <available file="${astest.jar.dir}/${astest.alternative.jar.name}_content/META-INF/persistence.xml" 
   	    property="have.persistence.xml" />
-  	<antcall target="change-hbm2ddl-update-to-none" />
-  	<jar destfile="${astest.jar.dir}/${astest.alternative.jar.name}">
-        <fileset dir="${astest.jar.dir}/${astest.alternative.jar.name}_content"/>
-  	</jar>
-  	<delete dir="${astest.jar.dir}/${astest.alternative.jar.name}_content" />
+    <antcall target="change-hbm2ddl-update-to-none" />
+    <jar destfile="${astest.jar.dir}/${astest.alternative.jar.name}">
+      <fileset dir="${astest.jar.dir}/${astest.alternative.jar.name}_content"/>
+    </jar>
+    <delete dir="${astest.jar.dir}/${astest.alternative.jar.name}_content" />
   </target>
   
   <target name="change-hbm2ddl-update-to-none" if="have.persistence.xml">
-  	<replace file="${astest.jar.dir}/${astest.alternative.jar.name}_content/META-INF/persistence.xml" summary="true">
-  		<replacetoken><![CDATA[name="hibernate.hbm2ddl.auto" value="update"]]></replacetoken>
-  		<replacevalue><![CDATA[name="hibernate.hbm2ddl.auto" value="none"  ]]></replacevalue> 
-  	</replace>
+    <replace file="${astest.jar.dir}/${astest.alternative.jar.name}_content/META-INF/persistence.xml" summary="true">
+      <replacetoken><![CDATA[name="hibernate.hbm2ddl.auto" value="update"]]></replacetoken>
+      <replacevalue><![CDATA[name="hibernate.hbm2ddl.auto" value="none"  ]]></replacevalue> 
+    </replace>
   </target>
   
   <target name="hack-after-astest-run-for-db2_9.7" if="want.db2_9.7">
-  	<!-- undeploy license .jar file  -->
-  	<delete file="${jboss.home}/server/crashrecovery-${tstype}/lib/db2jcc_license_cu.jar" />
+    <!-- undeploy license .jar file  -->
+    <delete file="${jboss.home}/server/crashrecovery-${tstype}/lib/db2jcc_license_cu.jar" />
   </target>
   
   
   <target name="hack-before-astest-run-for-oracle_rac" if="want.oracle_rac">
+    <antcall target="hack-before-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac2-xa-ds.xml"/></antcall>
+  </target>
   
+  <target name="hack-after-astest-run-for-oracle_rac" if="want.oracle_rac">
+    <antcall target="hack-after-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac2-xa-ds.xml"/></antcall>
+  </target>
+
+  <target name="hack-before-astest-run-for-oracle_rac_r2" if="want.oracle_rac_r2">
+    <antcall target="hack-before-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac-r2-2-xa-ds.xml"/></antcall>
+  </target>
+  
+  <target name="hack-after-astest-run-for-oracle_rac_r2" if="want.oracle_rac_r2">
+    <antcall target="hack-after-astest-run-for-oracle_racs"><param name="oracle_rac_second_ds" value="oracle-rac-r2-2-xa-ds.xml"/></antcall>
+  </target>
+
+  <target name="hack-before-astest-run-for-oracle_racs">
     <!-- deploy the second DS configuration  -->
-    <copy file="${product.dir}/resources/oracle-rac2-xa-ds.xml" todir="${jboss.home}/server/crashrecovery-${tstype}/deploy" />
+    <copy file="${product.dir}/resources/${oracle_rac_second_ds}" todir="${jboss.home}/server/crashrecovery-${tstype}/deploy" />
 
     <!-- hack the configuration of JBossTS in order to use the second datasource for crash recovery -->
     <replace file="${jboss.home}/server/crashrecovery-${tstype}/conf/jbossts-properties.xml">
       <replacetoken><![CDATA[com.arjuna.ats.internal.jbossatx.jta.AppServerJDBCXARecovery;jndiname=CrashRecoveryDS]]></replacetoken>
       <replacevalue><![CDATA[com.arjuna.ats.internal.jbossatx.jta.AppServerJDBCXARecovery;jndiname=RecoveryDS]]></replacevalue>
     </replace>
-  	    
   </target>
-  
-  <target name="hack-after-astest-run-for-oracle_rac" if="want.oracle_rac">
-  
-  	<!-- undeploy the second DS configuration -->
-  	<delete file="${jboss.home}/server/crashrecovery-${tstype}/deploy/oracle-rac2-xa-ds.xml" />
+
+  <target name="hack-after-astest-run-for-oracle_racs">
+    <!-- undeploy the second DS configuration -->
+    <delete file="${jboss.home}/server/crashrecovery-${tstype}/deploy/${oracle_rac_second_ds}" />
   	
     <!-- archive cluster jbossts configuration -->
-    <copy file="${jboss.home}/server/crashrecovery-${tstype}/conf/jbossts-properties.xml" tofile="${jboss.home}/server/crashrecovery-${tstype}/jbossts-properties-for-cluster-tests.xml" />
+    <copy file="${jboss.home}/server/crashrecovery-${tstype}/conf/jbossts-properties.xml" tofile="${jboss.home}/server/crashrecovery-${tstype}/jbossts-properties-for-${oracle_rac_second_ds}.xml" />
     
     <!-- unhack the configuration of JBossTS -->
     <replace file="${jboss.home}/server/crashrecovery-${tstype}/conf/jbossts-properties.xml">
       <replacetoken><![CDATA[com.arjuna.ats.internal.jbossatx.jta.AppServerJDBCXARecovery;jndiname=RecoveryDS]]></replacetoken>
       <replacevalue><![CDATA[com.arjuna.ats.internal.jbossatx.jta.AppServerJDBCXARecovery;jndiname=CrashRecoveryDS]]></replacevalue>
     </replace>
-    
   </target>
     
   
@@ -560,7 +596,7 @@
       <astest:action abortOnFail="false" waitFor="10000" impl="org.jboss.test.crashrecovery.taskdefs.JUnitClientAction">
         <param key="testClass" value="org.jboss.test.crashrecovery.ASCrashRecovery01.WipeOutTxsInDoubt" />
         <param key="name" value="test-wipeout-txs-indoubt-${dbname}" />
-        <param key="serverName" value="crashrecovery-${tstype}" />
+        <param key="serverName" value="crashrecovery-jta" />
         <param key="debug" value="true" />
         <param key="reportFile" value="${build.reports}/TEST-org.jboss.test.crashrecovery.ASCrashRecovery01.WipeOutTxsInDoubt-${dbname}.xml" />
       </astest:action>
@@ -572,10 +608,10 @@
   </target>
 
 	
-	<!-- =====  get db drivers - borrowed from  https://svn.jboss.org/repos/labs/labs/jbosstm/trunk/qa/build.xml  ==== -->
-    <!-- set these to the location(s) of the database drivers -->
+  <!-- =====  get db drivers - borrowed from  https://svn.jboss.org/repos/labs/labs/jbosstm/trunk/qa/build.xml  ==== -->
+  <!-- set these to the location(s) of the database drivers -->
 	
-	<property name="driver.url" value="http://reports.qa.atl.jboss.com/jdbc-drivers/"/>
+    <property name="driver.url" value="http://reports.qa.atl.jboss.com/jdbc-drivers"/>
 	
     <target name="prepare-drivers">
        <available file="${driver.home}" property="have.dbdrivers" value="true"/>   	
@@ -588,28 +624,28 @@
     	
         <get src="${driver.url}/maven2/com/oracle/ojdbc14/10.2.0.4/ojdbc14-10.2.0.4.jar"
              dest="${driver.home}/ojdbc14.jar"/>
-        <get src="${driver.url}/maven2/com/oracle/ojdbc6/11.1.0.7.0/ojdbc6-11.1.0.7.0.jar"
+        <get src="${driver.url}/maven2/com/oracle/ojdbc6/11.2.0.1.0/ojdbc6-11.2.0.1.0.jar"
              dest="${driver.home}/ojdbc6.jar"/>
 
         <get src="${driver.url}/maven2/com/microsoft/sqlserver/msjdbc/2.0.1008.2/msjdbc-2.0.1008.2-4.jar"
              dest="${driver.home}/sqljdbc4.jar"/>
 
-        <get src="${driver.url}/maven2/postgresql/postgresql/8.3-604/postgresql-8.3-604-jdbc4.jar"
+        <get src="${driver.url}/postgresql-8.3-605.jdbc4.jar"
              dest="${driver.home}/postgresql-8.3.jar"/>
-        <get src="${driver.url}/maven2/postgresql/postgresql/8.2-504/postgresql-8.2-504-jdbc3.jar"
+        <get src="${driver.url}/postgresql-8.2-510.jdbc4.jar"
              dest="${driver.home}/postgresql-8.2.jar"/>
 
-        <get src="${driver.url}/maven2/mysql/mysql-connector-java/5.1.7/mysql-connector-java-5.1.7.jar"
-             dest="${driver.home}/mysql-connector-java-5.1.7.jar"/>
+        <get src="${driver.url}/maven2/mysql/mysql-connector-java/5.1.8/mysql-connector-java-5.1.8.jar"
+             dest="${driver.home}/mysql-connector-java-5.1.jar"/>
         <get src="${driver.url}/maven2/mysql/mysql-connector-java/5.0.8/mysql-connector-java-5.0.8.jar"
-             dest="${driver.home}/mysql-connector-java-5.0.8.jar"/>
+             dest="${driver.home}/mysql-connector-java-5.0.jar"/>
 
-        <get src="${driver.url}/maven2/com/ibm/db2jcc/3.1.57/db2jcc-3.1.57.jar"
+        <get src="${driver.url}/maven2/com/ibm/db2jcc/3.57.86/db2jcc-3.57.86.jar"
              dest="${driver.home}/db2jcc.jar"/>
-        <get src="${driver.url}/maven2/com/ibm/db2jcc_license_cu/3.1.57/db2jcc_license_cu-3.1.57.jar"
+        <get src="${driver.url}/maven2/com/ibm/db2jcc_license_cu/3.57.86/db2jcc_license_cu-3.57.86.jar"
              dest="${driver.home}/db2jcc_license_cu.jar"/>
 
-        <get src="${driver.url}/maven2/com/sybase/jconnect/6.0.5/jconnect-6.0.5.jar"
+        <get src="${driver.url}/maven2/com/sybase/jconnect/6.0.5_26564/jconnect-6.0.5_26564.jar"
              dest="${driver.home}/jconn3.jar"/>
 
     </target>




More information about the jboss-cvs-commits mailing list