Skip to content

Commit 5cc342c

Browse files
author
cod1k
committed
Add timeout for child process execution in server test
This update ensures the child process in the server test has a maximum execution time of 5000ms, improving test reliability and preventing indefinite hangs. Also skip the test if no auth token specified
1 parent 212bdaf commit 5cc342c

File tree

1 file changed

+5
-1
lines changed
  • dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests

1 file changed

+5
-1
lines changed

dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ const EVENT_POLLING_TIMEOUT = 90_000;
99

1010
test(
1111
'Find symbolicated event on sentry',
12-
async ({ expect }) => {
12+
async ({ expect, skip }) => {
13+
if (!authToken) {
14+
skip('Auth token not set, skipping test');
15+
}
1316
const eventId = childProcess.execSync(`node ${path.join(__dirname, '..', 'dist', 'app.js')}`, {
1417
encoding: 'utf-8',
18+
timeout: 5_000,
1519
});
1620

1721
console.log(`Polling for error eventId: ${eventId}`);

0 commit comments

Comments
 (0)