[jboss-svn-commits] JBL Code SVN: r38039 - in labs/jbosstm/branches/JBOSSTS_4_16: XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore and 7 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Apr 19 12:44:31 EDT 2012


Author: paul.robinson
Date: 2012-04-19 12:44:30 -0400 (Thu, 19 Apr 2012)
New Revision: 38039

Modified:
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/WS-T/dev/src11/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/BACoordinator.java
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/check-all.sh
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestBACrashDuringCommit.java
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/lib/byteman.jar
   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/BASubordinateCrashDuringCommit.txt
   labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommitAfterSubordinateExit.txt
   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/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/subordinate/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java
   labs/jbosstm/branches/JBOSSTS_4_16/scripts/hudson/narayana.sh
Log:
JBTM-1115 com.arjuna.wst.SystemException on BA XTS Crash Recovery tests

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/WS-T/dev/src11/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/WS-T/dev/src11/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/WS-T/dev/src11/com/arjuna/wst11/stub/BusinessAgreementWithParticipantCompletionStub.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -114,8 +114,13 @@
          */
         final State state = participant.cancel() ;
 
-        if (state == State.STATE_CANCELING)
+        if (state == State.STATE_COMPLETED)
         {
+            //Complete arrived, whilst the coordinator was trying to abort.
+            compensate();
+        }
+        else if (state == State.STATE_CANCELING)
+        {
             throw new SystemException() ;
         }
         else if (state == State.STATE_FAILING_CANCELING)

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/BACoordinator.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/BACoordinator.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/model/sagas/arjunacore/BACoordinator.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -281,6 +281,8 @@
         int status = status();
         // completed is only legitimate when the TX is in these states
         switch (status) {
+            case ActionStatus.ABORTED:
+                break;
             case ActionStatus.RUNNING:
             case ActionStatus.ABORT_ONLY:
                 changeParticipantStatus(participantId, COMPLETED);

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/check-all.sh
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/check-all.sh	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/check-all.sh	2012-04-19 16:44:30 UTC (rev 38039)
@@ -9,13 +9,15 @@
 
 SCRIPTS=$(find $DIR -name \*.txt)
 
-JARS=$(cd ../../..; find -name \*.jar)
+JARS=$(cd ../../..; find . -name \*.jar)
 
 for i in $JARS; do
 	CP="$CP:../../../$i";
 done
 
+CP="$CP:../../sar/tests/target/classes"
+
 for s in $SCRIPTS; do
 	echo $s
-	bmcheck.sh -cp $CP $s | grep TestScript
+	bmcheck.sh -cp $CP $s
 done

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -53,11 +53,22 @@
 		if(killed) {
 			log.info("jboss-as killed by byteman scirpt");
 		} else {
-			log.info("jboss-as not killed and will shutdown");
+			log.info("jboss-as not killed and shutdown");
 			Process p = Runtime.getRuntime().exec(shutdownSequence);
 			p.waitFor();
 			p.destroy();
-			throw new RuntimeException("jboss-as not killed");
+			// wait 5 * 60 second for jboss-as shutdown complete
+			int checkn_s = 0;
+			do {
+				if(checkJBossAlive()) {
+					Thread.sleep(5000);
+				} else {
+					log.info("jboss-as shutdown");
+					break;
+				}
+				checkn_s ++;
+			} while (checkn_s < 60);
+			throw new RuntimeException("jboss-as not killed and shutdown");
 		}
 	}
 	

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -18,11 +18,11 @@
 public class BaseCrashTest
 {
     protected String XTSServiceTest = " -Dorg.jboss.jbossts.xts.servicetests.XTSServiceTestName=@TestName@";
-    protected String BytemanArgs = "-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/@BMScript at .txt,boot:target/test-classes/lib/byteman.jar,listener:true";
+    protected String BytemanArgs = "-Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.byteman.verbose -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/@BMScript at .txt,boot:target/test-classes/lib/byteman.jar,listener:true";
     protected String javaVmArguments;
     protected String testName;
     protected String scriptName;
-    private final static String xtstestWar = "../tests/build/webapps/xtstest.war";
+    private final static String xtstestWar = "../tests/target/xtstest.war";
     @ArquillianResource
     private ContainerController controller;
     @ArquillianResource

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestBACrashDuringCommit.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestBACrashDuringCommit.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/TestBACrashDuringCommit.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -20,7 +20,7 @@
 	@Test
 	public void MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest() throws Exception {
 		testName = "MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest";
-		String testClass = "org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantCoordinatorCompletionParticipantCloseAndExitTest";
+		String testClass = "org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantCoordinatorCompletionParticipantCloseTest";
 		runTest(testClass);
 	}
 	

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/lib/byteman.jar
===================================================================
(Binary files differ)

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-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringCommit.txt	2012-04-19 16:44:30 UTC (rev 38039)
@@ -273,6 +273,140 @@
 #   received closed message for XXXXXXX completion participant stub XXXXXX
 #   removed committed activity XXXXXX
 #
+
+######################################################################
+#JBTM-1115 Rules
+#
+
+#####################################################################
+# Setup counter MultiParticipantParticipantCompletionParticipantCloseTest
+#
+RULE setup counter MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 3),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+#####################################################################
+# Setup counter MultiParticipantCoordinatorCompletionParticipantCloseTest
+#
+RULE setup counter MultiParticipantCoordinatorCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantParticipantCompletionParticipantCloseAndExitTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 3),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+#####################################################################
+# Setup counter MultiServiceParticipantCompletionParticipantCloseTest
+#
+RULE setup counter MultiServiceParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 3),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+#####################################################################
+# Setup counter MultiServiceParticipantCompletionParticipantCloseAndExitTest
+#
+RULE setup counter MultiServiceParticipantCompletionParticipantCloseAndExitTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseAndExitTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 3),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+
+
+
+#####################################################################
+# Trigger Rendezvous after three calls to BACoordinator.complete()
+# 
+RULE trigger rendezvous on complete
+CLASS com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator
+METHOD participantCompleted(String)
+AT EXIT
+IF (debug("decrementing") AND decrementCounter("closes") == 0)
+DO debug("closes-complete, triggering rendezvous"),
+   rendezvous("closes-complete")
+ENDRULE
+
+#####################################################################
+# Trigger Rendezvous after three calls to BACoordinator.exit()
+#
+RULE trigger rendezvous on exit
+CLASS com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator
+METHOD delistParticipant(String)
+AT EXIT
+IF (debug("decrementing") AND decrementCounter("closes") == 0)
+DO debug("closes-complete, triggering rendezvous"),
+   rendezvous("closes-complete")
+ENDRULE
+
+
+
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiServiceParticipantCompletionParticipantCloseTest
+# 
+RULE wait for closes MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiParticipantParticipantCompletionParticipantCloseAndExitTest
+#
+RULE wait for closes MultiParticipantParticipantCompletionParticipantCloseAndExitTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiParticipantParticipantCompletionParticipantCloseAndExitTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiServiceParticipantCompletionParticipantCloseTest
+#
+RULE wait for closes MultiServiceParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiServiceParticipantCompletionParticipantCloseAndExitTest
+#
+RULE wait for closes MultiServiceParticipantCompletionParticipantCloseAndExitTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.MultiServiceParticipantCompletionParticipantCloseAndExitTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+
+
+
+
 #######################################################################
 # This rule resets the periodic recovery wait period to 10 seconds
 # in order to speed up the test. Setting this any lower may result

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-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BACrashDuringOnePhaseCommit.txt	2012-04-19 16:44:30 UTC (rev 38039)
@@ -206,6 +206,51 @@
 #   compensated recovered XXXXXXX completion participant XXXXXX
 #   JVM exit
 #
+
+######################################################################
+#JBTM-1115 Rules
+#
+
+#####################################################################
+# Setup counter SingleParticipantCompletionParticipantCloseTest
+#
+RULE setup counter SingleParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.SingleParticipantCompletionParticipantCloseTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 1),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+
+#####################################################################
+# Trigger Rendezvous after three calls to BACoordinator.complete()
+#
+RULE trigger rendezvous on complete
+CLASS com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator
+METHOD participantCompleted(String)
+AT EXIT
+IF (debug("decrementing") AND decrementCounter("closes") == 0)
+DO debug("closes-complete, triggering rendezvous"),
+   rendezvous("closes-complete")
+ENDRULE
+
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on SingleParticipantCompletionParticipantCloseTest
+#
+RULE wait for closes SingleParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.SingleParticipantCompletionParticipantCloseTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+
+
+
 #######################################################################
 # This rule resets the periodic recovery wait period to 10 seconds
 # in order to speed up the test. Setting this any lower may result

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommit.txt	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommit.txt	2012-04-19 16:44:30 UTC (rev 38039)
@@ -303,6 +303,52 @@
 #   removed transaction XXXXXX
 #   JVM exit after removing both transactions
 #
+
+#####################################################################
+#JBTM-1115 Rules
+#
+
+#####################################################################
+# Setup counter MultiParticipantParticipantCompletionParticipantCloseTest
+#
+RULE setup counter subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 1),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+
+#####################################################################
+# Trigger Rendezvous after three calls to BACoordinator.complete()
+#
+RULE trigger rendezvous on complete
+CLASS com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator
+METHOD participantCompleted(String)
+AT EXIT
+IF (debug("decrementing") AND decrementCounter("closes") == 0)
+DO debug("closes-complete, triggering rendezvous"),
+   rendezvous("closes-complete")
+ENDRULE
+
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiParticipantParticipantCompletionParticipantCloseTest
+#
+RULE wait for closes subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+
+
+
+
 #######################################################################
 # This rule opens a file for the trace output during XTS startup
 # It will be opened for append at reboot so messages from both runs

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommitAfterSubordinateExit.txt
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommitAfterSubordinateExit.txt	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringCommitAfterSubordinateExit.txt	2012-04-19 16:44:30 UTC (rev 38039)
@@ -253,6 +253,7 @@
 #   JVM exit
 #
 
+
 #######################################################################
 # This rule opens a file for the trace output during XTS startup
 # It will be opened for append at reboot so messages from both runs

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-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/resources/scripts/BASubordinateCrashDuringComplete.txt	2012-04-19 16:44:30 UTC (rev 38039)
@@ -277,6 +277,53 @@
 #
 #   JVM exit
 #
+
+
+#####################################################################
+#JBTM-1115 Rules
+#
+
+#####################################################################
+# Setup counter MultiParticipantParticipantCompletionParticipantCloseTest
+#
+RULE setup counter subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT ENTRY
+IF TRUE
+DO debug("creating counter and rendezvous"),
+   createCounter("closes", 1),
+   createRendezvous("closes-complete", 2)
+ENDRULE
+
+#####################################################################
+# Trigger Rendezvous after three calls to BACoordinator.complete()
+#
+RULE trigger rendezvous on complete
+CLASS com.arjuna.mwlabs.wscf.model.sagas.arjunacore.BACoordinator
+METHOD participantCompleted(String)
+AT EXIT
+IF (debug("decrementing") AND decrementCounter("closes") == 0)
+DO debug("closes-complete, triggering rendezvous"),
+   rendezvous("closes-complete")
+ENDRULE
+
+#####################################################################
+# Wait on Rendezvous before calling uba.close() on MultiParticipantParticipantCompletionParticipantCloseTest
+#
+RULE wait for closes subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+CLASS org.jboss.jbossts.xts.servicetests.test.ba.subordinate.MultiParticipantParticipantCompletionParticipantCloseTest
+METHOD run()
+AT CALL UserBusinessActivity.close()
+IF TRUE
+DO debug("waiting to call close"),
+   rendezvous("closes-complete"),
+   debug("rendezvous complete, calling close")
+ENDRULE
+
+
+
+
 #######################################################################
 # This rule opens a file for the trace output during XTS startup
 # It will be opened for append at reboot so messages from both runs

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/subordinate/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/subordinate/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/src/org/jboss/jbossts/xts/servicetests/test/ba/subordinate/MultiParticipantParticipantCompletionParticipantCloseAndExitTest.java	2012-04-19 16:44:30 UTC (rev 38039)
@@ -154,6 +154,7 @@
         // now close the activity
 
         try {
+            Thread.sleep(10000);
             ba.close();
         } catch (TransactionRolledBackException e) {
             exception = e;
@@ -163,6 +164,8 @@
             exception = e;
         } catch (WrongStateException e) {
             exception = e;
+        } catch (InterruptedException e) {
+            exception = e;
         }
 
         if (exception != null) {

Modified: labs/jbosstm/branches/JBOSSTS_4_16/scripts/hudson/narayana.sh
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/scripts/hudson/narayana.sh	2012-04-19 16:05:30 UTC (rev 38038)
+++ labs/jbosstm/branches/JBOSSTS_4_16/scripts/hudson/narayana.sh	2012-04-19 16:44:30 UTC (rev 38039)
@@ -3,6 +3,12 @@
   exit -1;
 fi
 
+# FOR DEBUGGING SUBSEQUENT ISSUES
+free -m
+
+#Make sure no JBoss processes running
+for i in `ps -eaf | grep java | grep "standalone*.xml" | grep -v grep | cut -c10-15`; do echo $i; done
+
 #BUILD JBOSSTS
 ant -Demma.enabled=false -Dpublican=false jbossall
 if [ "$?" != "0" ]; then



More information about the jboss-svn-commits mailing list