[jboss-cvs] JBossAS SVN: r92007 - in branches/JBPAPP_5_0/testsuite: src/main/org/jboss/test/crashrecovery/crash and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 5 07:22:13 EDT 2009
Author: istudens at redhat.com
Date: 2009-08-05 07:22:13 -0400 (Wed, 05 Aug 2009)
New Revision: 92007
Modified:
branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/crash/CrashHelper.java
branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml
Log:
fixed wiping of txs in doubt from DB, it can wipe out more than one tx now, JBPAPP-2374
Modified: branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml
===================================================================
--- branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml 2009-08-05 10:09:28 UTC (rev 92006)
+++ branches/JBPAPP_5_0/testsuite/imports/config/tests-crash-recovery.xml 2009-08-05 11:22:13 UTC (rev 92007)
@@ -28,7 +28,7 @@
| or for a selective 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
|
- | Note: If you want to force the wiping out any txs in doubt from DB before the test run you can use the property -DwipeOutTxsInDoubt=true.
+ | 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"
description="Runs JBossTS crash recovery tests">
Modified: branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/crash/CrashHelper.java
===================================================================
--- branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/crash/CrashHelper.java 2009-08-05 10:09:28 UTC (rev 92006)
+++ branches/JBPAPP_5_0/testsuite/src/main/org/jboss/test/crashrecovery/crash/CrashHelper.java 2009-08-05 11:22:13 UTC (rev 92007)
@@ -97,13 +97,7 @@
if (txInDoubt == null || txInDoubt.length == 0)
return true;
-
- if (txInDoubt.length > 1)
- {
- log.error("There are more then 1 txs in doubt in the DB, we are not the only one.");
- return false;
- }
-
+
log.info("There are " + txInDoubt.length + " xids in doubt");
for (int k=0; k < txInDoubt.length; k++)
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-08-05 10:09:28 UTC (rev 92006)
+++ branches/JBPAPP_5_0/testsuite/src/resources/crashrecovery/scripts/as-tests.xml 2009-08-05 11:22:13 UTC (rev 92007)
@@ -486,31 +486,41 @@
<!--
Do use this target if you want to wipe out txs in doubt in all databases.
-->
- <target name="wipeout-txs-indoubt-for-all-dbs" depends="want-all-dbs, wipeout-txs-indoubt" />
+ <target name="wipeout-txs-indoubt-all-dbs" depends="want-all-dbs, wipeout-txs-indoubt-single-db" />
<!--
Do use this target if you want to wipe out txs in doubt.
You can select the databases by setting crash.db property, see target set-db.
- See target call-tests-for-all-dbs and targets call-tests-for-* .
-->
- <target name="wipeout-txs-indoubt" depends="set-db">
+ <target name="wipeout-txs-indoubt-single-db" depends="set-db, prepare-drivers">
+ <property name="tstype" value="jta" />
<antcall target="call-tests-for-all-dbs"><param name="call.target" value="execute-wipeout-txs-indoubt"/></antcall>
</target>
- <target name="execute-wipeout-txs-indoubt">
+ <target name="execute-wipeout-txs-indoubt" depends="hack-before-astest-run, wipeout-txs-indoubt, hack-after-astest-run"/>
+
+ <target name="wipeout-txs-indoubt">
+ <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-jta" >
<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.WipeOutTxsInDoubt" />
<param key="name" value="test-wipeout-txs-indoubt-${dbname}" />
- <param key="serverName" value="crashrecovery-jta" />
+ <param key="serverName" value="crashrecovery-${tstype}" />
<param key="debug" value="true" />
+ <param key="reportFile" value="${build.reports}/TEST-org.jboss.test.crashrecovery.ASCrashRecovery01.WipeOutTxsInDoubt-${dbname}.xml" />
</astest:action>
<astest:server method="stop" serverName="crashrecovery-jta" >
<undeploy from="deploy/${datasource}" />
<undeploy from="lib/${dbdriver}" />
+ <undeploy from="deploy/${astest.app.jar.name}" />
</astest:server>
</target>
More information about the jboss-cvs-commits
mailing list