Skip to content

fix(tests): resolve flaky Testcontainers lifecycle causing intermittent CI failures#5

Merged
hechi merged 1 commit intomainfrom
fix/flaky-backend-tests
Apr 3, 2026
Merged

fix(tests): resolve flaky Testcontainers lifecycle causing intermittent CI failures#5
hechi merged 1 commit intomainfrom
fix/flaky-backend-tests

Conversation

@hechi
Copy link
Copy Markdown
Owner

@hechi hechi commented Apr 3, 2026

Description

Move @container fields to companion objects in all @testinstance(PER_CLASS) test classes so Testcontainers manages the container lifecycle correctly (static/shared scope instead of per-instance). Also set maxParallelForks=1 to prevent Exposed's global Database registry from being overwritten by concurrently running test classes, which caused random PSQLException: Connection refused errors on CI.

…nt CI failures

Move @container fields to companion objects in all @testinstance(PER_CLASS)
test classes so Testcontainers manages the container lifecycle correctly
(static/shared scope instead of per-instance). Also set maxParallelForks=1
to prevent Exposed's global Database registry from being overwritten by
concurrently running test classes, which caused random PSQLException:
Connection refused errors on CI.
@hechi hechi merged commit 32cace4 into main Apr 3, 2026
3 checks passed
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.

1 participant