Skip to content

[v3-3-test] Stabilize testcontainers provider tests on slow (ARM) CI runners (#68963) - #69054

Merged
potiuk merged 1 commit into
v3-3-testfrom
backport-9b0fe28-v3-3-test
Jun 26, 2026
Merged

[v3-3-test] Stabilize testcontainers provider tests on slow (ARM) CI runners (#68963)#69054
potiuk merged 1 commit into
v3-3-testfrom
backport-9b0fe28-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

The mongo provider tests boot a real mongo:8.0 container via testcontainers
in the setup phase of the first test that uses the session fixture. That
bring-up -- image pull, container start, readiness ping -- has to fit inside
the per-test pytest setup-timeout (60s). On the GitHub-hosted ARM canary,
where the image cache is cold and registry/disk throughput is lower, the
pull alone can eat most of that budget, so setup times out and cascades into
"ERROR at setup" across every TestMongoHook test. AMD does not hit this
because it runs on every PR with warm caches; ARM only runs on the cron
canary.

Two complementary changes:

  • Pre-pull the testcontainers images (mongo:8.0 + ryuk) on the shared host
    daemon before the timed run, but only in CI and only when the owning
    provider's tests are actually in the selection -- so the slow cold-cache
    pull happens outside the per-test setup timeout. Locally it stays a no-op.

  • Give pytest setup/teardown timeouts a higher floor (180s) for container-
    backed fixtures, while keeping execution-timeout at the per-test value so
    genuinely hung tests are still caught quickly.
    (cherry picked from commit 9b0fe28)

Co-authored-by: Jarek Potiuk jarek@potiuk.com

…runners (#68963)
The mongo provider tests boot a real mongo:8.0 container via testcontainers
in the setup phase of the first test that uses the session fixture. That
bring-up -- image pull, container start, readiness ping -- has to fit inside
the per-test pytest setup-timeout (60s). On the GitHub-hosted ARM canary,
where the image cache is cold and registry/disk throughput is lower, the
pull alone can eat most of that budget, so setup times out and cascades into
"ERROR at setup" across every TestMongoHook test. AMD does not hit this
because it runs on every PR with warm caches; ARM only runs on the cron
canary.
Two complementary changes:
- Pre-pull the testcontainers images (mongo:8.0 + ryuk) on the shared host
daemon before the timed run, but only in CI and only when the owning
provider's tests are actually in the selection -- so the slow cold-cache
pull happens outside the per-test setup timeout. Locally it stays a no-op.
- Give pytest setup/teardown timeouts a higher floor (180s) for container-
backed fixtures, while keeping execution-timeout at the per-test value so
genuinely hung tests are still caught quickly.
(cherry picked from commit 9b0fe28)
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk
potiuk marked this pull request as ready for review June 26, 2026 18:54
@potiuk
potiuk merged commit 8f25ac3 into v3-3-testJun 26, 2026
140 of 149 checks passed
@potiuk
potiuk deleted the backport-9b0fe28-v3-3-test branch June 26, 2026 20:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@potiuk