The executor has no way to test a decision in isolation. Every executor test today boots a full Micronaut context with a database and queues, so a suite takes minutes, reproducing a production bug means standing up an environment, and a whole class of defects — emitting a queue event from inside a state-store transaction — is invisible because the transaction boundary is never observable from a runner test.
What is missing is a harness that runs the real ExecutorService and the real message handlers as plain code: feed it an event, assert on the decision it returns. No context, no database, no threads. With in-memory state-store fakes held honest by contracts shared with the JDBC and Elasticsearch stores, so a drifting fake fails CI rather than silently passing.
This is worth doing on its own merits, independent of any particular implementation: it turns executor bugs into single tests written in minutes, and it makes the transactional seams explicit enough to be asserted on.
A full implementation already exists as an open PR, #17257, which can serve as the reference or the starting point.
The executor has no way to test a decision in isolation. Every executor test today boots a full Micronaut context with a database and queues, so a suite takes minutes, reproducing a production bug means standing up an environment, and a whole class of defects — emitting a queue event from inside a state-store transaction — is invisible because the transaction boundary is never observable from a runner test.
What is missing is a harness that runs the real
ExecutorServiceand the real message handlers as plain code: feed it an event, assert on the decision it returns. No context, no database, no threads. With in-memory state-store fakes held honest by contracts shared with the JDBC and Elasticsearch stores, so a drifting fake fails CI rather than silently passing.This is worth doing on its own merits, independent of any particular implementation: it turns executor bugs into single tests written in minutes, and it makes the transactional seams explicit enough to be asserted on.
A full implementation already exists as an open PR, #17257, which can serve as the reference or the starting point.