修正容器进程组清理断言
使用可执行成员语义校验Linux进程组已停止 避免容器孤儿僵尸让signal探活断言误报失败
This commit is contained in:
@@ -5,7 +5,11 @@ import { join } from 'node:path';
|
||||
|
||||
import { describe, expect, test, vi } from 'vitest';
|
||||
|
||||
import { spawnChild, terminateChildTree } from '../scripts/start-dev-stack.mjs';
|
||||
import {
|
||||
isProcessGroupAlive,
|
||||
spawnChild,
|
||||
terminateChildTree,
|
||||
} from '../scripts/start-dev-stack.mjs';
|
||||
import {
|
||||
buildTauriArguments,
|
||||
runTauriDev,
|
||||
@@ -200,7 +204,7 @@ describe('AI 游戏创作 Tauri dev 生命周期', () => {
|
||||
});
|
||||
|
||||
expect(result).toBe(42);
|
||||
expect(() => process.kill(-cliChild.pid, 0)).toThrow();
|
||||
expect(isProcessGroupAlive(cliChild.pid)).toBe(false);
|
||||
} finally {
|
||||
if (Number.isInteger(cliChild?.pid)) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user