[jboss-svn-commits] JBL Code SVN: r28921 - labs/jbosstm/trunk/XTS/sar/tests/dd/scripts.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Aug 12 09:53:41 EDT 2009
Author: adinn
Date: 2009-08-12 09:53:41 -0400 (Wed, 12 Aug 2009)
New Revision: 28921
Modified:
labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATSubordinateCrashDuringCommit.txt
Log:
updated subordinate TX byteman script to ensure clean exit
Modified: labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATSubordinateCrashDuringCommit.txt
===================================================================
--- labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATSubordinateCrashDuringCommit.txt 2009-08-12 13:53:30 UTC (rev 28920)
+++ labs/jbosstm/trunk/XTS/sar/tests/dd/scripts/ATSubordinateCrashDuringCommit.txt 2009-08-12 13:53:41 UTC (rev 28921)
@@ -557,12 +557,13 @@
#######################################################################
# This rule is triggered when the recovery system finds a PREPARED
-# activity in the log and reruns the phase 2 commit operation.
+# parent activity in the log and reruns the phase 2 commit operation.
# It prints a message which can be used to verify that the test has
-# progressed as expected.
+# progressed as expected and creates a countdown used to detect exit of
+# both transactions
RULE trace prepared replay
-CLASS org.jboss.jbossts.xts.recovery.coordinator.ba.RecoverACCoordinator
+CLASS org.jboss.jbossts.xts.recovery.coordinator.at.RecoverACCoordinator
METHOD replayPhase2
AT INVOKE phase2Commit
BIND coordinator = $0,
@@ -571,11 +572,32 @@
IF (status == com.arjuna.ats.arjuna.coordinator.ActionStatus.PREPARED)
OR
(status == com.arjuna.ats.arjuna.coordinator.ActionStatus.COMMITTING)
-DO debug("replaying close for prepared transaction " + uid),
- traceln("log", "replaying commit for prepared transaction " + uid)
+DO debug("replaying commit for prepared transaction " + uid),
+ traceln("log", "replaying commit for prepared transaction " + uid),
+ createCountDown("exit countdown", 1)
ENDRULE
#######################################################################
+# This rule is triggered when the recovery system finds a PREPARED
+# subordinate activity in the log and reruns the phase 2 commit operation.
+# It prints a message which can be used to verify that the test has
+# progressed as expected
+
+RULE trace prepared replay
+CLASS org.jboss.jbossts.xts.recovery.coordinator.at.RecoverSubordinateCoordinator
+METHOD replayPhase2
+AT INVOKE removeRecoveredCoordinator
+BIND coordinator = $0,
+ uid : Uid = coordinator.identifier(),
+ status : int = coordinator.status()
+IF (status == com.arjuna.ats.arjuna.coordinator.ActionStatus.PREPARED)
+ OR
+ (status == com.arjuna.ats.arjuna.coordinator.ActionStatus.COMMITTING)
+DO debug("replaying commit for prepared subordinate transaction " + uid),
+ traceln("log", "replaying commit for prepared subordinate transaction " + uid)
+ENDRULE
+
+#######################################################################
# This rule is triggered when the recovery system deletes the COMMITTED
# activity from the log. It prints a message which can be used to
# verify that the test has completed.
@@ -590,3 +612,20 @@
DO traceln("log", "removed committed transaction " + uid),
debug("removed committed transaction " + uid)
ENDRULE
+
+#######################################################################
+# activity from the log for the second time. It ensures that the JVM
+# exits. n.b. it waits for the second delete because both the subordinate
+# tx and the parent tx need to be deleted.
+
+RULE trace remove committed state and exit JVM
+CLASS com.arjuna.ats.arjuna.coordinator.BasicAction
+METHOD updateState
+AFTER CALL remove_committed
+BIND action : BasicAction = $0,
+ uid = action.get_uid()
+IF countDown("exit countdown")
+DO traceln("log", "JVM exit after removing both transactions"),
+ debug("JVM exit after removing both transactions"),
+ killJVM()
+ENDRULE
More information about the jboss-svn-commits
mailing list