NOTICK Fix statemachine error handling tests (#6057)

Due to a change in how messaging works, `ActionExecutorImpl
.executeSendInitial` was no longer being called. Changing the byteman
script to throw exception on hits to `ActionExecutorImpl
.executeSendMultiple` allowed the tests to pass.
This commit is contained in:
Dan Newton 2020-03-12 12:48:40 +00:00 committed by GitHub
parent bc5224b97f
commit 3b335ebb00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -34,15 +34,15 @@ class StatemachineGeneralErrorHandlingTest : StatemachineErrorHandlingTest() {
val rules = """ val rules = """
RULE Create Counter RULE Create Counter
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF createCounter("counter", $counter) IF createCounter("counter", $counter)
DO traceln("Counter created") DO traceln("Counter created")
ENDRULE ENDRULE
RULE Throw exception on executeSendInitial action RULE Throw exception on executeSendMultiple action
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF readCounter("counter") < 4 IF readCounter("counter") < 4
DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die") DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die")
@ -114,15 +114,15 @@ class StatemachineGeneralErrorHandlingTest : StatemachineErrorHandlingTest() {
val rules = """ val rules = """
RULE Create Counter RULE Create Counter
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF createCounter("counter", $counter) IF createCounter("counter", $counter)
DO traceln("Counter created") DO traceln("Counter created")
ENDRULE ENDRULE
RULE Throw exception on executeSendInitial action RULE Throw exception on executeSendMultiple action
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF readCounter("counter") < 3 IF readCounter("counter") < 3
DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die") DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die")

View File

@ -208,15 +208,15 @@ class StatemachineKillFlowErrorHandlingTest : StatemachineErrorHandlingTest() {
val rules = """ val rules = """
RULE Create Counter RULE Create Counter
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF createCounter("counter", $counter) IF createCounter("counter", $counter)
DO traceln("Counter created") DO traceln("Counter created")
ENDRULE ENDRULE
RULE Throw exception on executeSendInitial action RULE Throw exception on executeSendMultiple action
CLASS ${ActionExecutorImpl::class.java.name} CLASS ${ActionExecutorImpl::class.java.name}
METHOD executeSendInitial METHOD executeSendMultiple
AT ENTRY AT ENTRY
IF readCounter("counter") < 4 IF readCounter("counter") < 4
DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die") DO incrementCounter("counter"); traceln("Throwing exception"); throw new java.lang.RuntimeException("die dammit die")