mirror of
https://github.com/openclaw/openclaw.git
synced 2026-09-28 14:12:28 +08:00
fix(tests): settle subagent steer work before teardown (#155888)
Join the existing registry settlement boundary before resetting announcement mocks and registry state. The real requester-wake imports otherwise retain Gateway roots across fixture teardown and can fail the following suite. A direct ownership trace changed from eight unfinished wake imports and 22 cleanup boundaries with active roots to all imports joined and zero remaining roots. Production scheduling and cancellation are unchanged.
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
} from "../../../tasks/task-runtime.test-helpers.js";
|
||||
import { subagentRuns } from "./subagent-registry-memory.js";
|
||||
import { persistSubagentRunsToDiskOrThrow } from "./subagent-registry-state.js";
|
||||
import { settleSubagentRegistryPersistenceWork } from "./subagent-registry.persistence.test-support.js";
|
||||
|
||||
const noop = () => {};
|
||||
let lifecycleHandler:
|
||||
@@ -353,6 +354,7 @@ describe("subagent registry steer restarts", () => {
|
||||
|
||||
afterEach(async () => {
|
||||
vi.useRealTimers();
|
||||
await settleSubagentRegistryPersistenceWork();
|
||||
announceSpy.mockReset();
|
||||
announceSpy.mockResolvedValue("delivered");
|
||||
runSubagentEndedHookMock.mockReset();
|
||||
|
||||
Reference in New Issue
Block a user