fix(09): WR-03/IN-03/IN-04 add drain-listener teardown, test-only __resetDrainState, and remove stale RED @ts-ignore
This commit is contained in:
@@ -873,6 +873,18 @@ export function stopOutboxTrigger(): void {
|
||||
unsubscribeDrain = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* IN-03: test-only reset for the module-level concurrency flags.
|
||||
* isDraining/drainRequested are the entire concurrency contract for the
|
||||
* single-process deployment and are NOT touched by vi.resetAllMocks(). Tests call
|
||||
* this in beforeEach so each test starts from a known-quiescent state instead of
|
||||
* relying on the previous test having drained cleanly. Not for production use.
|
||||
*/
|
||||
export function __resetDrainState(): void {
|
||||
isDraining = false;
|
||||
drainRequested = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the 15-second background outbox drain schedule (polling fallback, D-08).
|
||||
* Call once at API startup (wired in index.ts beside startBrokerPoller).
|
||||
|
||||
Reference in New Issue
Block a user