Skip to content

Commit 617fede

Browse files
committed
chore: prevent test from creating zombie process (#20392)
An interval is set to keep the scenario file running in the vercel/sigterm-flush integration test. Ensure that the interval is cleared once the SIGTERM signal arrives, so that the scenario process can exit normally.
1 parent 29604aa commit 617fede

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • dev-packages/node-integration-tests/suites/vercel/sigterm-flush

dev-packages/node-integration-tests/suites/vercel/sigterm-flush/scenario.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ Sentry.captureMessage('SIGTERM flush message');
3333
console.log('READY');
3434

3535
// Keep the process alive so the integration test can send SIGTERM.
36-
setInterval(() => undefined, 1_000);
36+
const interval = setInterval(() => undefined, 10_000);
37+
38+
// allow graceful exit once the SIGTERM arrives.
39+
process.once('SIGTERM', () => clearInterval(interval));

0 commit comments

Comments
 (0)