From bac2df4b7f920ce271f0a15f1db9ed99b35300f3 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 8 Mar 2026 10:53:03 -0700 Subject: [PATCH] test: isolate child adapter service env --- src/process/supervisor/adapters/child.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/process/supervisor/adapters/child.test.ts b/src/process/supervisor/adapters/child.test.ts index 88885800b57..8494a701c7e 100644 --- a/src/process/supervisor/adapters/child.test.ts +++ b/src/process/supervisor/adapters/child.test.ts @@ -1,7 +1,7 @@ import type { ChildProcess } from "node:child_process"; import { EventEmitter } from "node:events"; import { PassThrough } from "node:stream"; -import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; +import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const { spawnWithFallbackMock, killProcessTreeMock } = vi.hoisted(() => ({ spawnWithFallbackMock: vi.fn(), @@ -58,6 +58,10 @@ describe("createChildAdapter", () => { beforeEach(() => { spawnWithFallbackMock.mockClear(); killProcessTreeMock.mockClear(); + delete process.env.OPENCLAW_SERVICE_MARKER; + }); + + afterAll(() => { if (originalServiceMarker === undefined) { delete process.env.OPENCLAW_SERVICE_MARKER; } else {