Skip to content

Commit efd8f0c

Browse files
committed
chore: prevent test from creating zombie process
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 fa9fea2 commit efd8f0c

File tree

1 file changed

+4
-1
lines changed
  • dev-packages/node-integration-tests/suites/vercel/sigterm-flush

1 file changed

+4
-1
lines changed

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)