Skip to content

test: enforce shared SQL fixtures - #1882

Merged
dcramer merged 3 commits into
mainfrom
fix/stabilize-integration-fixtures
Sep 17, 2026
Merged

dcramer merged 3 commits into
mainfrom
fix/stabilize-integration-fixtures

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Use one shared SQL fixture boundary for Junior tests.

  • Normal database tests use createJuniorSqlFixture, which opens a rollback-only transaction against the migrated per-worker Postgres database.
  • Migration contract tests use an explicit empty fixture through the same shared module.
  • The test architecture check rejects direct Postgres fixture imports, the ambiguous old local fixture, and empty fixtures outside the approved migration contract tests.
  • Integration CI allows 20 seconds for shared-runner variance.

Evidence:

  • The release branch failed three times with different timed-out tests.
  • slack-schedule-tools.test.ts took 54.9–107.5 seconds and created a new database plus applied 43 migrations for each of 52 tests.
  • With the migrated transaction fixture, three local runs passed all 52 tests in 33.9–44.2 seconds.

Checks:

  • pnpm test-architecture:check
  • pnpm --filter @sentry/junior typecheck
  • pnpm --filter @sentry/junior exec vitest run --maxWorkers=2 --testTimeout=20000 tests/integration/slack-schedule-tools.test.ts
  • pnpm --filter @sentry/junior exec vitest run tests/component/artifacts.test.ts tests/component/conversation-message-search.test.ts
  • pnpm --filter @sentry/junior exec vitest run --testTimeout=20000 tests/integration/workspace-snapshot-migration.test.ts

via David Cramer.

--

View Junior Session [Sentry]

Co-Authored-By: David Cramer <david@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Sep 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Sep 17, 2026 8:57pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown

1 screenshot change — 1 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Executions · Desktop
Automation Executions · Desktop
Changed

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer marked this pull request as ready for review September 17, 2026 21:12
@github-actions github-actions Bot added the risk: high PR risk score: high label Sep 17, 2026
@dcramer
dcramer merged commit af7da2e into main Sep 17, 2026
43 checks passed
@dcramer
dcramer deleted the fix/stabilize-integration-fixtures branch September 17, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant