[jboss-svn-commits] JBL Code SVN: r24164 - labs/jbosstm/workspace/adinn/orchestration/dd/scripts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Dec 1 05:47:05 EST 2008


Author: adinn
Date: 2008-12-01 05:47:05 -0500 (Mon, 01 Dec 2008)
New Revision: 24164

Modified:
   labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover.txt
   labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover10.txt
   labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover.txt
   labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover10.txt
Log:
modified scripts so they no longer rley on line numbers

Modified: labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover.txt
===================================================================
--- labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover.txt	2008-12-01 10:44:55 UTC (rev 24163)
+++ labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover.txt	2008-12-01 10:47:05 UTC (rev 24164)
@@ -93,19 +93,13 @@
 # While the countdown is active committed messages will be blocked.
 # Note that it calls isRecovered() to detect that the stub has been
 # recreated from the log.
-# The line number is the line following the assignments of the local state.
-# This ensures the rule is triggered after invocation of
-# the super class constructor. Placing the trigger after the super
-# constructor call is vital for constructors since the rule cannot call
-# methods on the instance until after it has been initialized. In theory
-# it should be possible to set line = -1 and have the rule system compile
-# in the trigger call at the correct place. However, it is not smart enough
-# to do this just yet
+# The line number is the trigger point is after assignment of all
+# the instance's fields ensuring the rule can safely test them.
 
 RULE add coordinator engine countdown
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD <init>(String, boolean, W3CEndpointReference, boolean, State)
-LINE 96
+AFTER WRITE recovered
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -118,13 +112,12 @@
 # This rule is triggered when a non-recovered participant stub
 # (CoordinatorEngine) is sent a commit message i.e. immediately
 # after a successful prepare. It exits the JVM, simulating a crash.
-# The line number is the first executable line in the method (it
-# could be specified as -1)
+# The trigger point is at the start of the method
 
 RULE kill JVM
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD commit
-LINE 316
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(), 
      identifier:String = engine.getId()
@@ -141,13 +134,12 @@
 # after a successful prepare. It decrements the countdown. First
 # time round this takes it from 1 to 0 but leaves it in place. Second
 # time round it removes it allowing committed messages to flow.
-# The line number is the first executable line in the method (it
-# could be specified as -1)
+# The trigger point is at the start of the method.
 
 RULE countdown at commit
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD commit
-LINE 316
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -167,13 +159,13 @@
 # thread which responds to a COMMITTED message from a participant.
 # If it detects a countdown registered using the participant id it
 # throws a runtime exception causing the thread to abort and stopping
-# delivery of the COMMITTED message. The line number is -1 so the
-# rule code gets run as soon as the method is entered.
+# delivery of the COMMITTED message. The trigger point is at the start
+# of the method.
 
 RULE kill committed thread
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD committed(Notification, AddressingProperties, ArjunaContext)
-LINE -1
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -190,14 +182,12 @@
 # This rule is triggered when the recovery system finds the PREPARED
 # transaction in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has
-# worked correctly. The line number is the one where the call to
-# phase2Commit is called but actually the test would also work with
-# line = -1 since the condition selects the correct case.
+# worked correctly. The trigger point is at the call to phase2Commit.
 
 RULE trace prepared replay
 CLASS org.jboss.jbossts.xts.recovery.RecoverACCoordinator
 METHOD replayPhase2
-LINE 74
+AT INVOKE phase2Commit
 BIND coordinator = $0,
      uid : Uid = coordinator.identifier(),
      status : int = coordinator.status()
@@ -211,14 +201,12 @@
 # This rule is triggered when the recovery system finds the COMMITTED
 # transaction in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has
-# worked correctly. The line number is the one where the call to
-# phase2Commit is called but actually the test would also work with
-# line = -1 since the condition selects the correct case.
+# worked correctly. The trigger point is at the call to phase2Commit.
 
 RULE trace heuristic committed replay
 CLASS org.jboss.jbossts.xts.recovery.RecoverACCoordinator
 METHOD replayPhase2
-LINE 74
+AT INVOKE phase2Commit
 BIND coordinator = $0,
      uid : Uid = coordinator.identifier(),
      status : int = coordinator.status()
@@ -230,14 +218,14 @@
 # This rule is triggered when the recovery system deletes the COMMITTED
 # transaction from the log. It prints a message which can be used to
 # verify that the test has worked correctly. It also kills the JVM to
-# halt the test. The line number is the one just following the delete
-# of the record from the TX object store, ensuring that the JVM is not
-# exited until the log has actually been cleaned up.
+# halt the test. The trigger point is on return from the call to
+# remove_committed, ensuring that the log is cleaned up before the exit
+# takes place
 
 RULE trace remove committed state
 CLASS com.arjuna.ats.arjuna.coordinator.BasicAction
 METHOD updateState
-LINE 3529
+AFTER INVOKE remove_committed
 BIND action : BasicAction = $0,
      uid  = action.get_uid()
 IF TRUE

Modified: labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover10.txt
===================================================================
--- labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover10.txt	2008-12-01 10:44:55 UTC (rev 24163)
+++ labs/jbosstm/workspace/adinn/orchestration/dd/scripts/HeuristicSaveAndRecover10.txt	2008-12-01 10:47:05 UTC (rev 24164)
@@ -93,19 +93,13 @@
 # While the countdown is active committed messages will be blocked.
 # Note that it calls isRecovered() to detect that the stub has been
 # recreated from the log.
-# The line number is the line following the assignments of the local state.
-# This ensures the rule is triggered after invocation of
-# the super class constructor. Placing the trigger after the super
-# constructor call is vital for constructors since the rule cannot call
-# methods on the instance until after it has been initialized. In theory
-# it should be possible to set line = -1 and have the rule system compile
-# in the trigger call at the correct place. However, it is not smart enough
-# to do this just yet
+# The trigger point follows all the field assignments, ensuring that they
+# can be read by the rule.
 
 RULE add coordinator engine countdown
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD <init>(String, boolean, EndpointReferenceType, boolean, State)
-LINE 118
+AFTER WRITE recovered
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -118,13 +112,12 @@
 # This rule is triggered when a non-recovered participant stub
 # (CoordinatorEngine) is sent a commit message i.e. immediately
 # after a successful prepare. It exits the JVM, simulating a crash.
-# The line number is the first executable line in the method (it
-# could be specified as -1)
+# The trigger point is the first line.
 
 RULE kill JVM
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD commit
-LINE 369
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(), 
      identifier:String = engine.getId()
@@ -141,13 +134,12 @@
 # after a successful prepare. It decrements the countdown. First
 # time round this takes it from 1 to 0 but leaves it in place. Second
 # time round it removes it allowing committed messages to flow.
-# The line number is the first executable line in the method (it
-# could be specified as -1)
+# The trigger point is the first line.
 
 RULE countdown at commit
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD commit
-LINE 369
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -167,13 +159,13 @@
 # thread which responds to a COMMITTED message from a participant.
 # If it detects a countdown registered using the participant id it
 # throws a runtime exception causing the thread to abort and stopping
-# delivery of the COMMITTED message. The line number is -1 so the
-# rule code gets run as soon as the method is entered.
+# delivery of the COMMITTED message. The trigger point is the first
+# line.
 
 RULE kill committed thread
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD committed(NotificationType, AddressingContext, ArjunaContext)
-LINE -1
+AT ENTRY
 BIND engine:CoordinatorEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -190,14 +182,12 @@
 # This rule is triggered when the recovery system finds the PREPARED
 # transaction in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has
-# worked correctly. The line number is the one where the call to
-# phase2Commit is called but actually the test would also work with
-# line = -1 since the condition selects the correct case.
+# worked correctly. The trigger point is the call to phase2Commit.
 
 RULE trace prepared replay
 CLASS org.jboss.jbossts.xts.recovery.RecoverACCoordinator
 METHOD replayPhase2
-LINE 74
+AT INVOKE phase2Commit
 BIND coordinator = $0,
      uid : Uid = coordinator.identifier(),
      status : int = coordinator.status()
@@ -211,14 +201,12 @@
 # This rule is triggered when the recovery system finds the COMMITTED
 # transaction in the log and reruns the phase 2 commit operation.
 # It prints a message which can be used to verify that the test has
-# worked correctly. The line number is the one where the call to
-# phase2Commit is called but actually the test would also work with
-# line = -1 since the condition selects the correct case.
+# worked correctly. The trigger point is the call to phase2Commit.
 
 RULE trace heuristic committed replay
 CLASS org.jboss.jbossts.xts.recovery.RecoverACCoordinator
 METHOD replayPhase2
-LINE 74
+AT INVOKE phase2Commit
 BIND coordinator = $0,
      uid : Uid = coordinator.identifier(),
      status : int = coordinator.status()
@@ -230,14 +218,13 @@
 # This rule is triggered when the recovery system deletes the COMMITTED
 # transaction from the log. It prints a message which can be used to
 # verify that the test has worked correctly. It also kills the JVM to
-# halt the test. The line number is the one just following the delete
-# of the record from the TX object store, ensuring that the JVM is not
-# exited until the log has actually been cleaned up.
+# halt the test. The trigger point is after return from the call to
+# remove_committed, ensuring that the lgo is cleaned up before exit.
 
 RULE trace remove committed state
 CLASS com.arjuna.ats.arjuna.coordinator.BasicAction
 METHOD updateState
-LINE 3529
+AFTER INVOKE remove_committed
 BIND action : BasicAction = $0,
      uid  = action.get_uid()
 IF TRUE

Modified: labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover.txt
===================================================================
--- labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover.txt	2008-12-01 10:44:55 UTC (rev 24163)
+++ labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover.txt	2008-12-01 10:47:05 UTC (rev 24164)
@@ -85,13 +85,12 @@
 #######################################################################
 # This rule is triggered in the AS1 when a non-recovered WS-AT
 # participant receives a commit message. It causes the JVM to crash.
-# The line number is -1 so that this gets called on entry to the
-# methd
+# The trigger point is the start of the method.
 
 RULE crash unrecovered participant at commit
 CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
 METHOD commit
-LINE -1
+AT ENTRY
 BIND engine:ParticipantEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -106,13 +105,13 @@
 # This rule is triggered in the AS1 when a recovered WS-AT participant
 # is recreated from the log. It traces the call to allow success of the
 # test to be detected.
-# The line number is the end of the constructor so that this gets called
-# after all the fields ahev been filled in
+# The trigger point is the end of the constructor so that the rule can
+# safely read all the fields.
 
 RULE trace recovered participant recreate
 CLASS com.arjuna.wst11.messaging.engines.ParticipantEngine
 METHOD <init>(Participant, id, State, W3CEndpointReference, boolean)
-LINE -89
+AFTER WRITE persisted
 BIND engine:ParticipantEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -133,10 +132,7 @@
 # By default this is clear so the condition is true first time the
 # rule is called. The action sets te flag causing the condition to
 # evaluate to false on subsequent commit calls.
-# The line number identifies the line immediately following the call
-# to sendCommit. Note that sendCommit schedules a background thread
-# to keep resending commit messages so it is ok to stall the thread
-# which triggers this rule.
+# The trigger point is just before calling waitForState.
 
 RULE suspend coordinator after sending first commit
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
@@ -165,13 +161,12 @@
 # condition to be true before one of them could execute signal().
 # Although this would be harmless in this case it could be significant
 # when using other rules.
-# The line number is -1 so that this rule runs as soon as the
-# comitted method is entered.
+# The triogger point is at the sttart of the method.
 
 RULE signal waiting coordinator
 CLASS com.arjuna.wst11.messaging.engines.CoordinatorEngine
 METHOD committed
-LINE -1
+AT ENTRY
 BIND engine : CoordinatorEngine = $0,
      identifier:String = engine.getId()
 IF debug("received committed for participant " + identifier)

Modified: labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover10.txt
===================================================================
--- labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover10.txt	2008-12-01 10:44:55 UTC (rev 24163)
+++ labs/jbosstm/workspace/adinn/orchestration/dd/scripts/ParticipantCrashAndRecover10.txt	2008-12-01 10:47:05 UTC (rev 24164)
@@ -80,13 +80,12 @@
 #######################################################################
 # This rule is triggered in the AS1 when a non-recovered WS-AT
 # participant receives a commit message. It causes the JVM to crash.
-# The line number is -1 so that this gets called on entry to the
-# methd
+# The trigger point is at the start of the call.
 
 RULE crash unrecovered participant at commit
 CLASS com.arjuna.wst.messaging.engines.ParticipantEngine
 METHOD commit
-LINE -1
+AT ENTRY
 BIND engine:ParticipantEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -101,13 +100,13 @@
 # This rule is triggered in the AS1 when a recovered WS-AT participant
 # is recreated from the log. It traces the call to allow success of the
 # test to be detected.
-# The line number is the end of the constructor so that this gets called
-# after all the fields ahev been filled in
+# The trigger point is at teh end of the field writes so that the rule
+# can safely read them.
 
 RULE trace recovered participant recreate
 CLASS com.arjuna.wst.messaging.engines.ParticipantEngine
 METHOD <init>(Participant, String, State, EndpointReferenceType, boolean)
-LINE 110
+AFETR WRITE persisted
 BIND engine:ParticipantEngine = $0,
      recovered:boolean = engine.isRecovered(),
      identifier:String = engine.getId()
@@ -128,15 +127,12 @@
 # By default this is clear so the condition is true first time the
 # rule is called. The action sets te flag causing the condition to
 # evaluate to false on subsequent commit calls.
-# The line number identifies the line immediately following the call
-# to sendCommit. Note that sendCommit schedules a background thread
-# to keep resending commit messages so it is ok to stall the thread
-# which triggers this rule.
+# The triggger point is immediately before the call to waitForState.
 
 RULE suspend coordinator after sending first commit
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD commit
-LINE 383
+AT INVOKE waitForState
 BIND engine:CoordinatorEngine = $0,
      identifier:String = engine.getId()
 IF (NOT flagged("firstCommit"))
@@ -160,13 +156,12 @@
 # condition to be true before one of them could execute signal().
 # Although this would be harmless in this case it could be significant
 # when using other rules.
-# The line number is -1 so that this rule runs as soon as the
-# comitted method is entered.
+# The trigger point is the start of th method.
 
 RULE signal waiting coordinator
 CLASS com.arjuna.wst.messaging.engines.CoordinatorEngine
 METHOD committed
-LINE -1
+AT ENTRY
 BIND engine : CoordinatorEngine = $0,
      identifier:String = engine.getId()
 IF debug("received committed for participant " + identifier)




More information about the jboss-svn-commits mailing list