mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
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:
parent
bc5224b97f
commit
3b335ebb00
@ -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")
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user