Skip to content

Executor lacks a unit-test harness: every executor test needs a full runtime #19408

Description

@AcevedoR

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/backendNeeds backend code changeskind/cooldownGreat candidate for the cooldown period

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions