From 00b312c6cb759442f41e7cc6788edd1199efe677 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 17 Apr 2026 12:35:28 +0200 Subject: [PATCH] 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. --- .../suites/vercel/sigterm-flush/scenario.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev-packages/node-integration-tests/suites/vercel/sigterm-flush/scenario.ts b/dev-packages/node-integration-tests/suites/vercel/sigterm-flush/scenario.ts index 51e1b4d09ccf..21aa0deb1a1e 100644 --- a/dev-packages/node-integration-tests/suites/vercel/sigterm-flush/scenario.ts +++ b/dev-packages/node-integration-tests/suites/vercel/sigterm-flush/scenario.ts @@ -33,4 +33,7 @@ Sentry.captureMessage('SIGTERM flush message'); console.log('READY'); // Keep the process alive so the integration test can send SIGTERM. -setInterval(() => undefined, 1_000); +const interval = setInterval(() => undefined, 10_000); + +// allow graceful exit once the SIGTERM arrives. +process.once('SIGTERM', () => clearInterval(interval));