TypeScript
test(server): ACP teardown tests pass on Windows hosts (#17080)
Sheehan Munimcf821991863d
diff --git a/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts b/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.tsindex e8ae5a0c9dd..cfde3367a59 100644--- a/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts+++ b/apps/server/src/orchestration-v2/Adapters/AcpAdapterV2.test.ts@@ -12316,7 +12316,11 @@ describe("AcpAdapterV2", () => {});assert.equal(taskkillCommands.length, 1);yield* Scope.close(runtimeScope, Exit.void);- assert.equal(taskkillCommands.length, 1);+ // The scope finalizer picks its kill path from the host, not processGroupPlatform,+ // so only a Windows host sends it through taskkill a second time.+ const finalizerTaskkills = (yield* HostProcess.Platform) === "win32" ? 1 : 0;+ assert.equal(taskkillCommands.length, 1 + finalizerTaskkills);+ assert.deepEqual(taskkillCommands.at(-1), taskkillCommands[0]);}).pipe(Effect.provide(layerTest)),);@@ -12433,6 +12437,7 @@ describe("AcpAdapterV2", () => {it.live("poisons the session when hard teardown defects and blocks replacement work", () =>Effect.gen(function* () {+ if ((yield* HostProcess.Platform) !== "linux") return;const childProcessSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;const fileSystem = yield* FileSystem.FileSystem;const idAllocator = yield* IdAllocator.IdAllocatorV2;