You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test): fix CI hang and adapt tests for auth guard + PR #610
Three independent issues caused CI to hang and ~200 tests to fail:
1. **CI hang (telemetry.ts)**: `beforeExit` handler removal was inside
`if (client?.getOptions().enabled)`, so `initSentry(false)` in test
afterEach hooks never cleaned up the handler from a prior
`initSentry(true)`. Additionally, SDK-internal handlers from
`enableLogs` and `sendClientReports` were never cleaned up on
re-init. Fix: close previous client before re-init, move handler
removal outside enabled guard, gate enableLogs/sendClientReports on
`enabled`.
2. **Auth guard test failures (PR #611)**: `buildCommand` now requires
auth by default. Fix: set fake SENTRY_AUTH_TOKEN in test preload,
add `auth: false` to command.test.ts framework tests, save/clear/
restore env token in auth-specific tests.
3. **Dead code tests (PR #610)**: `createSentryProject` no longer does
org resolution (moved to wizard-runner's `resolvePreSpinnerOptions`).
Fix: rewrite 15 tests to call `resolveOrgSlug` and
`detectExistingProject` directly instead of through `handleLocalOp`.
Also fixes mtime test flakiness by replacing `Bun.sleep(10)` with
explicit `utimes()` calls in dsn-cache and project-root-cache tests.
Made-with: Cursor
0 commit comments