Skip to content

Commit 83395b9

Browse files
Fixing review comment
1 parent 736f2f8 commit 83395b9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/resource-monitoring-integration.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@ process.on('SIGTERM', () => {
217217
new Promise((_, reject) => setTimeout(() => reject(new Error('Timeout')), 10000))
218218
]);
219219

220-
// Process should exit (either gracefully or terminated)
221-
expect(adminProcess.killed || result.exitCode !== undefined).toBe(true);
220+
// Process should exit gracefully (exit code 0)
221+
expect(result.exitCode).toBe(0);
222222
} catch (error) {
223-
// If timeout or termination, that's acceptable in test environment
224-
expect(error.message === 'Timeout' || error.signal === 'SIGTERM' || error.signal === 'SIGKILL').toBe(true);
223+
// Only accept SIGTERM as a valid termination signal
224+
expect(error.signal).toBe('SIGTERM');
225225
}
226226
}, 15000);
227227

0 commit comments

Comments
 (0)