From 7571b736a1a55e6097a1aaeaff34ed032d9152ea Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 28 Aug 2026 14:55:29 +0200 Subject: [PATCH] test(ios): Speed up sentry-xcode-scripts tests Four upload-behavior tests in the sentry-xcode-debug-files.sh block never create a dSYM bundle and did not disable the dSYM wait, so each fell into wait_for_dsym_files() and waited out the full ~10s default timeout. They assert only on upload output, so disable the wait with SENTRY_DSYM_WAIT_ENABLED=false. The dedicated 'dSYM wait functionality' block still covers the wait behavior. Cuts the file from ~59s to ~15s with no change in coverage. Co-Authored-By: Claude Opus 4.8 --- packages/core/test/scripts/sentry-xcode-scripts.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core/test/scripts/sentry-xcode-scripts.test.ts b/packages/core/test/scripts/sentry-xcode-scripts.test.ts index 368ecc8906..c80547522b 100644 --- a/packages/core/test/scripts/sentry-xcode-scripts.test.ts +++ b/packages/core/test/scripts/sentry-xcode-scripts.test.ts @@ -61,10 +61,15 @@ describe('sentry-xcode-debug-files.sh', () => { } }; + // These tests exercise the upload path only and never create a dSYM bundle. Without disabling + // the dSYM wait they would each hit the full wait_for_dsym_files() timeout (~10s), so set + // SENTRY_DSYM_WAIT_ENABLED=false to keep them fast. The dSYM wait behavior is covered by the + // dedicated 'dSYM wait functionality' block below. it('exits with 0 when upload succeeds', () => { const result = runScript({ MOCK_CLI_EXIT_CODE: '0', MOCK_CLI_OUTPUT: 'Upload successful', + SENTRY_DSYM_WAIT_ENABLED: 'false', }); expect(result.exitCode).toBe(0); @@ -76,6 +81,7 @@ describe('sentry-xcode-debug-files.sh', () => { MOCK_CLI_EXIT_CODE: '1', MOCK_CLI_OUTPUT: 'Upload failed: API error', SENTRY_ALLOW_FAILURE: 'true', + SENTRY_DSYM_WAIT_ENABLED: 'false', }); expect(result.exitCode).toBe(0); @@ -88,6 +94,7 @@ describe('sentry-xcode-debug-files.sh', () => { const result = runScript({ MOCK_CLI_EXIT_CODE: '1', MOCK_CLI_OUTPUT: 'Upload failed: API error', + SENTRY_DSYM_WAIT_ENABLED: 'false', }); // Original behavior: script exits 0, but Xcode fails build due to "error:" prefix @@ -102,6 +109,7 @@ describe('sentry-xcode-debug-files.sh', () => { MOCK_CLI_EXIT_CODE: '1', MOCK_CLI_OUTPUT: 'Upload failed: Network error', SENTRY_ALLOW_FAILURE: 'false', + SENTRY_DSYM_WAIT_ENABLED: 'false', }); // Original behavior: script exits 0, but Xcode fails build due to "error:" prefix