Skip to content

Postgres store test times out on CI: first PGlite start inside a test #59

Closed

Description

@maaland

Why

PostgresStore (Store) > creates a running scan in packages/store-postgres/src/store.test.ts times out at 5 s on CI now and then (e.g. on #58, both Node 22 and 24), and locally under the full pnpm test. It blocks unrelated PRs.

Each test creates a fresh in-memory Postgres (PGlite). The first one also compiles PGlite's WebAssembly, which can take several seconds on a busy machine, all inside the first test's 5 s budget.

What to build

Start one PGlite before the tests, outside any test's timeout (a beforeAll with its own longer limit), so the WebAssembly is compiled and cached before the first test. No change to what the tests check.

Done when

  • The first store test no longer pays PGlite's start-up cost.
  • pnpm test passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions