Jellyfin.Database.Tests.PostgreSQL is not run in CI and has 3 failing tests #23

Closed
opened 2026-09-13 13:33:16 +10:00 by unkin-agent · 0 comments
Member

Context: multi-replica stateless deployment (two 2-replica apps, cheeztv and fafflix, each one PostgreSQL plus valkey, no sticky sessions). Tracking: #12.

Problem

.woodpecker/ci.yaml's postgres-migration-chain step is scoped to tests/Jellyfin.Server.Tests, so Jellyfin.Database.Tests.PostgreSQL never runs in CI at all.

Run against PostgreSQL 16 it fails three tests, identically on main:

  • PurgeDatabase_EmptiesTablesAndResetsFkRole — EF 10 scalar-query column naming.
  • Crud_DisplayPreferences — FK violation from the test's own fixture data.
  • RunScheduledOptimisation_ExecutesWithoutError — passes in isolation; collateral from shared container state in PostgreSqlProviderTests.

The PostgreSQL provider going unexercised in CI is the direct reason three separate bugs reached production.

Proposal

Convert the project to the in-step PostgreSqlTestServer pattern, give each test its own database so shared container state cannot leak between tests, fix the three failures, and fold the project into the existing postgres-migration-chain step rather than adding a second step and a second container.

Acceptance

  • postgres-migration-chain runs Jellyfin.Database.Tests.PostgreSQL, and the whole project passes.
  • Each test gets its own database; RunScheduledOptimisation_ExecutesWithoutError passes both in isolation and in the full run.
  • A failure in this project fails the pipeline — verified by temporarily breaking a test, or equivalent evidence in the PR.
Context: multi-replica stateless deployment (two 2-replica apps, `cheeztv` and `fafflix`, each one PostgreSQL plus valkey, no sticky sessions). Tracking: #12. ## Problem `.woodpecker/ci.yaml`'s `postgres-migration-chain` step is scoped to `tests/Jellyfin.Server.Tests`, so `Jellyfin.Database.Tests.PostgreSQL` never runs in CI at all. Run against PostgreSQL 16 it fails three tests, identically on `main`: - `PurgeDatabase_EmptiesTablesAndResetsFkRole` — EF 10 scalar-query column naming. - `Crud_DisplayPreferences` — FK violation from the test's own fixture data. - `RunScheduledOptimisation_ExecutesWithoutError` — passes in isolation; collateral from shared container state in `PostgreSqlProviderTests`. The PostgreSQL provider going unexercised in CI is the direct reason three separate bugs reached production. ## Proposal Convert the project to the in-step `PostgreSqlTestServer` pattern, give each test its own database so shared container state cannot leak between tests, fix the three failures, and fold the project into the existing `postgres-migration-chain` step rather than adding a second step and a second container. ## Acceptance - `postgres-migration-chain` runs `Jellyfin.Database.Tests.PostgreSQL`, and the whole project passes. - Each test gets its own database; `RunScheduledOptimisation_ExecutesWithoutError` passes both in isolation and in the full run. - A failure in this project fails the pipeline — verified by temporarily breaking a test, or equivalent evidence in the PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/jellyfin-ha-src#23