[jboss-svn-commits] JBL Code SVN: r37930 - in labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/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
Fri Mar 23 12:03:48 EDT 2012


Author: paul.robinson
Date: 2012-03-23 12:03:47 -0400 (Fri, 23 Mar 2012)
New Revision: 37930

Added:
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/README.txt
Modified:
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringPrepare.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringOnePhaseCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt
Log:
README to explain how to run these crash recovery tests

Added: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/README.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/README.txt	                        (rev 0)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/README.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -0,0 +1,71 @@
+export JBOSS_HOME=
+cp $JBOSS_HOME/bin/jboss-cli.sh $JBOSS_HOME/bin/jboss-admin.sh
+chmod +x $JBOSS_HOME/bin/jboss-admin.sh
+
+Set jboss version in pom.xml for:
+
+<artifactId>jboss-as-arquillian-container-managed</artifactId>
+<artifactId>jboss-as-controller-client</artifactId>
+
+Note, the tests may need to be ran one at a time, if the following issue has not been resolved: https://issues.jboss.org/browse/JBTM-1071. See the issue for the work around.
+
+If you do want to run them all at once, run:
+
+mvn test
+
+The raw logs in ./target/log are quite hard to read. Run the following command to create a more human readable set of logs:
+
+java -cp target/classes/ com.arjuna.qa.simplifylogs.SimplifyLogs ./target/log/ ./target/log-simplified
+
+The simplified logs are now in: ./target/log-simplified
+
+== Validating the log output ==
+There is a set of Byteman scripts in ./src/test/resources/scripts/. Each script applies to one or more test scenarios. Each valid combination of bytman script to test scenario was executed by the above tests. For example if you look at the 'ATCrashDuringCommit.txt' Byteman script in the 'Available tests include:' section, you will see that the following scenarios are supported:
+
+	org.jboss.jbossts.xts.servicetests.test.at.MultiParticipantPrepareAndCommitTest
+	org.jboss.jbossts.xts.servicetests.test.at.MultiServicePrepareAndCommitTest
+
+The output from these tests are named:
+
+	ATCrashDuringCommit.MultiParticipantPrepareAndCommitTest
+	ATCrashDuringCommit.MultiServicePrepareAndCommitTest
+
+You now need to look at the expected output for these logs in 'ATCrashDuringCommit.txt'.
+
+For example the expected output is:
+
+	#   prepared received for participant XXXXXX
+	#   prepared received for participant XXXXXX
+	#   prepared received for participant XXXXXX
+	#   JVM exit
+	#   created recovered coordinator engine XXXXXX
+	#   created recovered coordinator engine XXXXXX
+	#   created recovered coordinator engine XXXXXX
+	#   commit on recovered coordinator engine XXXXXX
+	#   commit on recovered coordinator engine XXXXXX
+	#   commit on recovered coordinator engine XXXXXX
+	#   removed committed transaction XXXXXX
+
+The simplified logs have converted this into something like this:
+
+	=== Before crash===
+	prepare on non recovered coordinator engine 0
+	received prepared message for coordinator engine 0
+	prepare on non recovered coordinator engine 1
+	prepared received for participant 1
+	prepare on non recovered coordinator engine 2
+	prepared received for participant 2
+
+
+	=== After crash===
+	created recovered coordinator engine 0
+	created recovered coordinator engine 1
+	created recovered coordinator engine 2
+	commit on recovered coordinator engine 0
+	commit on recovered coordinator engine 1
+	commit on recovered coordinator engine 2
+	removed committed transaction 3
+
+Here you can see that the participant IDs have been replaced with unique monotomicly increasing integer IDs starting from zero. The script that simplifies these logs is quite basic, so the transaction ID is also assigned an ID from the same pool. This explains why the log says "removed committed transaction 3" when there is only 1 transaction. These numbers should be treat as unique IDs and no order should be inferred.
+
+You should now be able to check the remainder of the logs, using this method

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringCommit.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringCommit.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -174,13 +174,17 @@
 # After reboot the JVM should exit leaving output in the following format in file
 # testlog.
 #
+#   prepare on non recovered coordinator engine XXXXXX
+#   received prepared message for coordinator engine XXXXXX
+#   prepare on non recovered coordinator engine XXXXXX
 #   prepared received for participant XXXXXX
+#   prepare on non recovered coordinator engine XXXXXX
 #   prepared received for participant XXXXXX
-#   prepared received for participant XXXXXX
 #   JVM exit
 #   created recovered coordinator engine XXXXXX
 #   created recovered coordinator engine XXXXXX
-#   created recovered coordinator engine XXXXXX
+#   created recovered coordinator engine XXXXX
+#   replaying commit for prepared transaction XXXX
 #   commit on recovered coordinator engine XXXXXX
 #   commit on recovered coordinator engine XXXXXX
 #   commit on recovered coordinator engine XXXXXX

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATCrashDuringOnePhaseCommit.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -172,9 +172,9 @@
 # After reboot file testlog written by the coordinator AS (AS1) should
 # contain output in the following format:
 #
-#   prepare sent for cordinator engine XXXXXX
+#   prepare sent for coordinator engine XXXXXX
 #   prepared received for cordinator engine XXXXXX
-#   commit sent for cordinator engine XXXXXX
+#   commit sent for coordinator engine XXXXXX (Only if running in two JVMs)
 #   JVM exit
 #   prepared received for unknown participant XXXXXX
 #   rollback sent for participant XXXXXX
@@ -182,7 +182,7 @@
 # After reboot file testlog written by the participant AS (AS2) should
 # contain output in the following format:
 #
-#   prepare received for participant XXXXXX
+#   prepare received for participant engine XXXXXX
 #   prepared sent for participant XXXXXX
 #   commit received for participant XXXXXX
 #   JVM exit

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringCommit.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringCommit.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -143,34 +143,27 @@
 #
 # After the first boot the JVM should exit leaving the following in file testlog
 #
+#   prepare sent for coordinator engine XXXXXX
 #   prepare received for participant XXXXXX
 #   prepared sent for participant XXXXXX
+#   prepared received for coordinator engine XXXXXX
 #   prepare called for pseudo-participant XXXXXX
 #   prepare completed for pseudo-participant XXXXXX
 #   prepare received for participant XXXXXX
+#   prepare called for pseudo participant XXXXXX
+#   prepare sent for coordinator engine XXXXXX
 #   prepare received for participant XXXXXX
 #   prepared sent for coordinator engine XXXXXX
+#   prepared received for coordinator engine XXXXXX
 #   prepared sent for coordinator engine XXXXXX
 #   JVM exit
 #
 # n.b. there should be at least one prepared message received for each participant
 # and in some cases there may be repeat messages
 #
-# After reboot the JVM should exit leaving output in the following format in file
+# After reboot the JVM should exit leaving additional output in the following format in file
 # testlog.
 #
-#   prepare sent for coordinator engine XXXXXX
-#   prepare received for participant XXXXXX
-#   prepared sent for participant XXXXXX
-#   prepare called for pseudo-participant XXXXXX
-#   prepare completed for pseudo-participant XXXXXX
-#   prepare received for participant XXXXXX
-#   prepare called for pseudo participant XXXXXX
-#   prepare sent for coordinator engine XXXXXX
-#   prepare received for participant XXXXXX
-#   prepared sent for coordinator engine XXXXXX
-#   prepared sent for coordinator engine XXXXXX
-#   JVM exit
 #   created recovered participant engine XXXXXX
 #   created recovered participant engine XXXXXX
 #   created recovered participant engine XXXXXX
@@ -394,24 +387,6 @@
 ENDRULE
 
 #######################################################################
-# This rule is triggered when a recovered coordinator engine
-# (CoordinatorEngine) receives a committed message. This
-# happens during replay of a prepared TX from
-# the log. It traces the call.
-
-RULE trace receive recovered participant committed
-CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
-METHOD committed
-AFTER SYNCHRONIZE
-BIND engine:CoordinatorEngine = $0,
-     recovered:boolean = engine.isRecovered(),
-     identifier:String = engine.getId()
-IF recovered
-DO debug("received committed for recovered coordinator engine " + identifier),
-   traceln("log", "received committed for recovered coordinator engine " + identifier)
-ENDRULE
-
-#######################################################################
 # This rule is triggered when a recovered participant engine
 # (ParticipantEngine) is requested to send a committed message. This
 # happens during replay of a prepared TX from
@@ -551,8 +526,7 @@
 AT EXIT
 BIND NOTHING
 IF TRUE
-DO debug("commit completed for subordinate coordinator " + $0),
-   traceln("log", "commit completed for subordinate coordinator " + $0)
+DO debug("commit completed for subordinate coordinator " + $0)
 ENDRULE
 
 #######################################################################

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringPrepare.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringPrepare.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/ATSubordinateCrashDuringPrepare.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -171,9 +171,11 @@
 #   prepare sent for Coordinator engine XXXXXX
 #   prepare received for participant XXXXXX
 #   prepared sent for participant XXXXXX
+#   prepared received for Coordinator engine XXXXXX
 #   prepare sent for Coordinator engine XXXXXX
 #   prepare received for participant XXXXXX
 #   prepared sent for participant XXXXXX
+#   prepared received for Coordinator engine XXXXXX
 #   prepare sent for Coordinator engine XXXXXX
 #   prepare called for pseudo participant XXXXXX
 #   prepare sent for participant XXXXXX
@@ -189,24 +191,9 @@
 #
 # and in some cases there may be repeat messages
 #
-# After reboot the JVM should exit leaving output in the following format in file
+# After reboot the JVM should exit leaving additional output in the following format in file
 # testlog.
 #
-#   prepare sent for Coordinator engine XXXXXX
-#   prepare received for participant XXXXXX
-#   prepared sent for participant XXXXXX
-#   prepare sent for Coordinator engine XXXXXX
-#   prepare received for participant XXXXXX
-#   prepared sent for participant XXXXXX
-#   prepare sent for Coordinator engine XXXXXX
-#   prepare called for pseudo participant XXXXXX
-#   prepare sent for participant XXXXXX
-#   prepare received for participant XXXXXX
-#   prepared sent for participant XXXXXX
-#   prepared received for participant XXXXXX
-#   prepare returned for subordinate transaction XXXXXX
-#   saved to disk transaction XXXXXX
-#   JVM exit
 #   created recovered Participant engine XXXXXX
 #   created recovered Participant engine XXXXXX
 #   created recovered Participant engine XXXXXX
@@ -234,7 +221,7 @@
 #   rollback returned for subordinate coordinator XXX
 #   rollback completed for pseudo-participant XXXXXX
 
-#   removed transaction XXXXXX
+#   removed transaction XXXXXX (Optional, the JVM may exit before this happens)
 #   (end parallel)
 #
 #   JVM exit

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringCommit.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringCommit.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -258,13 +258,9 @@
 #   complete on recovered XXXXXXX completion participant engine XXXXXXX        (number of occcurences depends upon test)
 #   JVM exit
 #
-# After reboot the JVM should exit leaving output in the following format in file
+# After reboot the JVM should exit leaving additional output in the following format in file
 # testlog.
 #
-#   received exit message for XXXXXXX completion participant stub XXXXXX       (only for CloseAndExit tests)
-#   received completed message for XXXXXXX completion participant stub XXXXXX  (number of occcurences depends upon test)
-#   complete on recovered XXXXXXX completion participant engine XXXXXXX        (number of occcurences depends upon test)
-#   JVM exit
 #   created recovered XXXXXXX completion participant stub XXXXXX
 #   created recovered XXXXXXX completion participant stub XXXXXX
 #   created recovered XXXXXXX completion participant stub XXXXXX

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringOnePhaseCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringOnePhaseCommit.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringOnePhaseCommit.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -191,23 +191,15 @@
 #   received close message for XXXXXXX completion participant XXXXXX
 #   JVM exit
 #
-# After reboot AS1 should exit leaving output in the following format in file
+# After reboot AS1 should exit leaving additional output in the following format in file
 # testlog
 #
-#   sent complete message for XXXXXXX completion engine XXXXXX (Coordinator Completion only)
-#   received completed message for XXXXXXX completion engine XXXXXX
-#   sent close message for XXXXXXX completion engine XXXXXX
-#   JVM exit
 #   received getstatus for unknown XXXXXXX completion participant XXXXXX
 #   sent invalidstate fault for unknown XXXXXXX completion participant XXXXXX
 #   JVM exit
 #
-# AS2 should exit leaving output in the following format in file testlog
+# AS2 should exit leaving additional output in the following format in file testlog
 #
-#   received complete message for XXXXXXX completion participant XXXXXX (Coordinator Completion only)
-#   sent completed message for XXXXXXX completion participant XXXXXX
-#   received close message for XXXXXXX completion participant XXXXXX
-#   JVM exit
 #   created recovered XXXXXXX completion participant XXXXXX
 #   sent getstatus for XXXXXXX completion participant XXXXXX
 #   received invalidstate fault for XXXXXXX completion participant XXXXXX

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt	2012-03-23 16:03:04 UTC (rev 37929)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt	2012-03-23 16:03:47 UTC (rev 37930)
@@ -465,7 +465,7 @@
 
 RULE trace send CC participant compensated
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine
-METHOD sendCompensated(boolean)
+METHOD sendCompensated
 AT INVOKE sendCompensated
 BIND engine:CoordinatorCompletionParticipantEngine = $0,
      identifier:String = engine.getId()
@@ -496,7 +496,7 @@
 
 RULE trace send participant compensated
 CLASS com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine
-METHOD sendCompensated(boolean)
+METHOD sendCompensated
 AT INVOKE sendCompensated
 BIND engine:ParticipantCompletionParticipantEngine = $0,
      identifier:String = engine.getId()



More information about the jboss-svn-commits mailing list