Skip to content

fix(db): PoolSuite no longer races the driver's refusal (#320) - #347

Open
matteobovetti wants to merge 2 commits into
Eezo-framework:devfrom
matteobovetti:issue-320
Open

matteobovetti wants to merge 2 commits into
Eezo-framework:devfrom
matteobovetti:issue-320

Conversation

@matteobovetti

@matteobovetti matteobovetti commented Oct 23, 2026 •

Copy link
Copy Markdown

What

The test "with the database down, the first read waits the acquire timeout" asserted that the
message contained the driver's word refused. That holds only if the driver's connect has already
failed when the 500 ms acquire timeout fires. Under load it had not, and the pool correctly said
"none recorded yet".

How

  • The first borrow now asserts only what does not depend on that ordering: the wait, the pool's
    own words, and that neither the password nor detached leaks into the message.
  • A new test asserts refused. It borrows until the pool has the driver's failure on record, with
    a 10 s deadline, so a real regression still fails with the last message.
  • bin/gate no longer lists PoolSuite as timing sensitive.

Testcontainers 1.21.4

Docker Engine 29 answers testcontainers 1.21.3 with an empty 400, so no suite that starts Postgres
could run. Bumped to 1.21.4 in project/Dependencies.scala. The examples build kept its own
literal 1.21.3 and stayed red, so blog and shop now take Dependencies.testcontainersPg through
the examples meta build, and the version has one home.

Not in this PR

ConnectionUnavailableSuite has the same race at a 250 ms timeout. Left for a follow up.

Closes #320

@matteobovetti
matteobovetti changed the base branch from main to dev October 23, 2026 15:57
@rcardin rcardin assigned rcardin and matteobovetti and unassigned rcardin Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

db: PoolSuite's acquire timeout test races the driver's refusal under load

2 participants