test: install the pg-boss schema the HTTP suite reads - #1
Merged
Merged
Conversation
The HTTP-transport suite pointed its adapter at a `pgboss` schema no suite ever created, so it read whatever an earlier run had left in the database. That is green on a developer's long-lived container and red on CI's fresh one, which is what it has been since it landed: every integration run on main has failed with UnsupportedSchemaError. It now installs pg-boss into its own `qd_it_http` schema, the way the version suite does with its own. The installer moves to a shared fixture — dropping the schema first, so a second local run reads the database it built rather than the one the first run shaped — and the version suite uses it too. The suite also asserts `probe.supported` now. Every assertion it had would hold against a schema the transport could not read: the backend name comes from the adapter, `findings` is an array when the diagnosis is empty, and the request count is met by the probe's own queries before anything reads a row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the red Integration job on
main(run 31145237749).What was failing
http-transport.integration.test.tspointed its adapter at apgbossschema that no suite creates — the version suite installsqd_it_v10/11/12, the graphile suite installsgraphile_worker. So it read whatever an earlier run happened to leave in the database: green on a developer's long-lived container, red on CI's fresh one.Not a flake and not a recent regression — it has failed on every integration run since it landed in
abb244a(2026-08-06). The last green CI onmainisf5df0a65.The fix
qd_it_httpschema, the way the version suite does with its own.test/integration/pgboss-fixture.ts. It drops the schema before installing, so a second local run reads the database it built rather than the one the first run shaped — the same idempotencyc672567gave the graphile suite. The version suite now uses it too (−54 lines of duplicated setup).expect(snapshot.probe.supported).toBe(true). Every assertion the test had would hold against a schema the transport could not read: the backend name comes from the adapter,findingsis an array when the diagnosis is empty, andseen.length > 5is met by the probe's own queries before anything reads a row. That is why it took a thrown error rather than a failed assertion to surface this.Verification
Against a real Postgres 16 (
postgres:16-alpine, same image CI uses):npm run test:integration— 32/32 passed, all 3 files. Run twice back-to-back against the same database to confirm the drop-first fixture is idempotent.UnsupportedSchemaError).npm run verify— lint, typecheck, 175 unit tests, build all pass.No
src/changes; test setup only.Generated by Claude Code