[jboss-svn-commits] JBL Code SVN: r37780 - in labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test: resources/scripts and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Dec 6 03:23:16 EST 2011
Author: zhfeng
Date: 2011-12-06 03:23:15 -0500 (Tue, 06 Dec 2011)
New Revision: 37780
Added:
labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringCommit.java
Modified:
labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java
labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringOnePhaseCommit.java
labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt
Log:
JBTM-817 update to add tests for ATCrashDuringCommit
Modified: labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java 2011-12-05 15:54:33 UTC (rev 37779)
+++ labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java 2011-12-06 08:23:15 UTC (rev 37780)
@@ -69,7 +69,7 @@
}
}
- protected void runTest(String testClass, long waitForRecovery) throws Exception {
+ protected void runTest(String testClass) throws Exception {
Config config = new Config();
config.add("javaVmArguments", javaVmArguments + XTSServiceTest.replace("@TestName@", testClass));
@@ -89,9 +89,10 @@
deployer.deploy("xtstest");
//Waiting for recovery
- Thread.sleep(waitForRecovery * 60 * 1000);
+ //Thread.sleep(waitForRecovery * 60 * 1000);
- deployer.undeploy("xtstest");
- controller.stop("jboss-as");
+ //deployer.undeploy("xtstest");
+ //controller.stop("jboss-as");
+ controller.kill("jboss-as");
}
}
Added: labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringCommit.java (rev 0)
+++ labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringCommit.java 2011-12-06 08:23:15 UTC (rev 37780)
@@ -0,0 +1,26 @@
+package com.arjuna.qa.junit;
+
+import org.jboss.arquillian.junit.Arquillian;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+ at RunWith(Arquillian.class)
+public class TestATCrashDuringCommit extends BaseCrashTest {
+ public TestATCrashDuringCommit() {
+ scriptName = "ATCrashDuringCommit";
+ }
+
+ @Test
+ public void MultiParticipantPrepareAndCommitTest() throws Exception {
+ testName = "MultiParticipantPrepareAndCommitTest";
+ String testClass = "org.jboss.jbossts.xts.servicetests.test.at.MultiParticipantPrepareAndCommitTest";
+ runTest(testClass);
+ }
+
+ @Test
+ public void MultiServicePrepareAndCommitTest() throws Exception {
+ testName = "MultiServicePrepareAndCommitTest";
+ String testClass = "org.jboss.jbossts.xts.servicetests.test.at.MultiServicePrepareAndCommitTest";
+ runTest(testClass);
+ }
+}
Property changes on: labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringCommit.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringOnePhaseCommit.java
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringOnePhaseCommit.java 2011-12-05 15:54:33 UTC (rev 37779)
+++ labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestATCrashDuringOnePhaseCommit.java 2011-12-06 08:23:15 UTC (rev 37780)
@@ -14,6 +14,6 @@
public void SingleParticipantPrepareAndCommit() throws Exception {
testName = "SingleParticipantPrepareAndCommit";
String testClass = "org.jboss.jbossts.xts.servicetests.test.at.SingleParticipantPrepareAndCommitTest";
- runTest(testClass, 4);
+ runTest(testClass);
}
}
Modified: labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt 2011-12-05 15:54:33 UTC (rev 37779)
+++ labs/jbosstm/trunk/XTS/localjunit/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt 2011-12-06 08:23:15 UTC (rev 37780)
@@ -439,6 +439,6 @@
BIND NOTHING
IF TRUE
DO debug("!!!killing JVM!!!"),
- traceln("log", "JVM exit")
-# killJVM()
+ traceln("log", "JVM exit"),
+ killJVM()
ENDRULE
More information about the jboss-svn-commits
mailing list