Skip to content

fix(auth): the database tests pass on a busy machine without timing out #708

Open

Description

@PiquelChips

On a busy machine, a full just db test fails a different handful of tests each run, and each one then passes alone. We saw this through the cleanup pass on a 16-core machine whose load average ran from 40 to 170 while several agents built and tested at once. The failures are timeouts in the test setup and in tests waiting on locks, not wrong results:

  • Connection pool: PoolTimedOut while a test connects (one run had 14 failures at the default thread count, another 7 at a load average around 78). Email and deletion tests were among them.
  • Migrations: "migrate: the database operation timed out" in fixtures that migrate a scratch schema (5 tests in one run).
  • Lock waits:

--test-threads 2 made every run pass. #590 (#617) and #651 (#652) fixed the same kind of failure for particular tests. #658 (#659) fixed one more.

Expected

The suite passes on a busy machine at its default thread count, without skipping tests. For example:

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

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions