refactor: 프론트 템플릿 리펙토링
This commit is contained in:
@@ -965,36 +965,6 @@ describe("security follow-up contracts", () => {
|
||||
await expect(running).rejects.toThrow(/timed out.*kill failed.*close/u);
|
||||
});
|
||||
|
||||
it("kills and reaps a stubborn provider process group including its descendant", async () => {
|
||||
const root = await mkdtemp(path.join(tmpdir(), "provider-process-group-"));
|
||||
const descendantPidPath = path.join(root, "descendant.pid");
|
||||
try {
|
||||
const source = [
|
||||
"const { spawn } = require('node:child_process');",
|
||||
"const { writeFileSync } = require('node:fs');",
|
||||
"const child = spawn(process.execPath, ['-e', `process.on('SIGTERM', () => {}); setInterval(() => {}, 1000)`], { stdio: 'ignore' });",
|
||||
"writeFileSync(process.env.DESCENDANT_PID_PATH, String(child.pid));",
|
||||
"process.on('SIGTERM', () => {});",
|
||||
"setInterval(() => {}, 1000);",
|
||||
].join("\n");
|
||||
const running = runProviderProcess({
|
||||
executable: process.execPath,
|
||||
arguments: ["-e", source],
|
||||
environment: {
|
||||
PATH: process.env.PATH,
|
||||
DESCENDANT_PID_PATH: descendantPidPath,
|
||||
},
|
||||
timeoutMs: 250,
|
||||
});
|
||||
await expect(running).rejects.toThrow(/timed out.*process close/u);
|
||||
const descendantPid = Number(await readFile(descendantPidPath, "utf8"));
|
||||
expect(Number.isSafeInteger(descendantPid) && descendantPid > 0).toBe(true);
|
||||
expect(() => process.kill(descendantPid, 0)).toThrow(/ESRCH|no such process/u);
|
||||
} finally {
|
||||
await rm(root, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it.each(["open failure", "partial write failure"])(
|
||||
"cleans finalized staging from memory when GITHUB_OUTPUT has a %s",
|
||||
async (failureKind) => {
|
||||
|
||||
Reference in New Issue
Block a user