[jboss-cvs] JBossAS SVN: r93926 - in branches/JBPAPP_5_0/testsuite: src/resources/crashrecovery/resources and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 22 11:14:34 EDT 2009
Author: istudens at redhat.com
Date: 2009-09-22 11:14:34 -0400 (Tue, 22 Sep 2009)
New Revision: 93926
Added:
branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac1-xa-ds.xml
branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac2-xa-ds.xml
Modified:
branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml
branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/imports/test-config.xml
Log:
JBossTS crash recovery tests for Oracle RAC cluster, JBPAPP-2843
Modified: branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml 2009-09-22 14:46:52 UTC (rev 93925)
+++ branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml 2009-09-22 15:14:34 UTC (rev 93926)
@@ -22,12 +22,15 @@
| Usage for all tests:
| ./build.sh tests-ts-crash-recovery
|
- | or for a selective database:
+ | or for selected database:
| ./build.sh tests-ts-crash-recovery -Dcrash.db=psql_8.3 -Dcrash.target=crash-tests-single-db
|
- | or for a selective test scenario:
+ | or for selected test scenario:
| ./build.sh tests-ts-crash-recovery -Dcrash.db=psql_8.3 -Dcrash.tstype=jts -Dcrash.tsdemarc=bmt -Dcrash.testcase=none.rev -Dcrash.target=crash-tests-single
|
+ | Usage for cluster tests:
+ | ./build.sh tests-ts-crash-recovery -Dcrash.db=oracle_rac -Dcrash.tstype=jts -Dcrash.target=crash-tests-single-db-tstype
+ |
| Note: If you want to force the wiping out any txs in doubt from DB before the test you can use the property -DwipeOutTxsInDoubtBeforeTest=true.
-->
<target name="tests-ts-crash-recovery"
Added: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac1-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac1-xa-ds.xml (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac1-xa-ds.xml 2009-09-22 15:14:34 UTC (rev 93926)
@@ -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=vmg24-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-rac2-xa-ds.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac2-xa-ds.xml (rev 0)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/resources/oracle-rac2-xa-ds.xml 2009-09-22 15:14:34 UTC (rev 93926)
@@ -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=vmg25-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>
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 2009-09-22 14:46:52 UTC (rev 93925)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml 2009-09-22 15:14:34 UTC (rev 93926)
@@ -89,6 +89,9 @@
<condition property="want.mssql_2008">
<equals arg1="${crash.db}" arg2="mssql_2008"/>
</condition>
+ <condition property="want.oracle_rac">
+ <equals arg1="${crash.db}" arg2="oracle_rac"/>
+ </condition>
</target>
<target name="want-all-dbs">
@@ -189,6 +192,7 @@
<antcall target="call-tests-for-mysql_5.1"/>
<antcall target="call-tests-for-db2_9.7"/>
<antcall target="call-tests-for-sybase_15"/>
+ <antcall target="call-tests-for-oracle_rac"/>
</target>
<target name="call-tests-for-psql_8.2" if="want.psql_8.2">
@@ -302,6 +306,20 @@
</antcall>
</target>
+ <target name="call-tests-for-oracle_rac" if="want.oracle_rac">
+ <!-- Oracle has qot different .jar for jdk 1.5 vs. 1.6 runtime -->
+ <condition property="oracle.driver" value="ojdbc6.jar">
+ <equals arg1="${java.specification.version}" arg2="1.6"/>
+ </condition>
+ <property name="oracle.driver" value="ojdbc5.jar"/>
+ <antcall target="${call.target}">
+ <param name="dbdriver" value="${oracle.driver}"/>
+ <param name="datasource" value="oracle-rac1-xa-ds.xml" />
+ <param name="dbname" value="oracle_rac" />
+ </antcall>
+ </target>
+
+
<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">
@@ -365,7 +383,7 @@
</target>
<target name="testcase-commit_halt" if="want.commit_halt">
- <!-- DISABLED test-case: the test is invalid for the current version -->
+ <!-- DISABLED test-case: the test is invalid for the current version of JBossTS -->
<antcall target="execute-crash-recovery-test">
<param name="specs" value="commit_halt"/><param name="reverseOrder" value="false"/><param name="rollbackExpected" value="false"/>
</antcall>
@@ -447,9 +465,9 @@
</sequential>
</target>
- <target name="hack-before-astest-run" depends="hack-before-astest-run-for-db2_9.7" />
+ <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-after-astest-run" depends="hack-after-astest-run-for-db2_9.7" />
+ <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-before-astest-run-for-db2_9.7" if="want.db2_9.7">
<!-- deploy license .jar file -->
@@ -489,7 +507,36 @@
</target>
+ <target name="hack-before-astest-run-for-oracle_rac" if="want.oracle_rac">
+ <!-- deploy the second DS configuration -->
+ <copy file="${product.dir}/resources/oracle-rac2-xa-ds.xml" 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" />
+
+ <!-- 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" />
+
+ <!-- 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>
+
+
<!--
Do use this target if you want to wipe out txs in doubt in all databases.
-->
Modified: branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/imports/test-config.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/imports/test-config.xml 2009-09-22 14:46:52 UTC (rev 93925)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/imports/test-config.xml 2009-09-22 15:14:34 UTC (rev 93926)
@@ -67,6 +67,8 @@
<sysproperty key="sun.rmi.dgc.client.gcInterval" value="3600000" />
<sysproperty key="sun.rmi.dgc.server.gcInterval" value="3600000" />
<sysproperty key="xb.builder.useUnorderedSequence" value="true" />
+ <!--jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/-->
</server>
<server name="crashrecovery-jts" host="${node0}">
More information about the jboss-cvs-commits
mailing list