Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for container reuse #28

Merged
merged 8 commits into from
Apr 5, 2024
Merged

Prepare for container reuse #28

merged 8 commits into from
Apr 5, 2024

Conversation

Barsonax
Copy link
Owner

@Barsonax Barsonax commented Apr 5, 2024

  • Generate the same sequence of database name per run for the same set of migrations. This allows test to reuse state from a previous run speeding them up and prevents many databases being created when reusing containers.
  • Clean database before the test instead of after, this will allow dev's to inspect the database state after a test was run.

Container reuse is not enabled by default though as its still experimental and during my own testing I noticed its not always stable. When starting multiple runs at the same time multiple containers are created after which testcontainers will keep crashing.

@Barsonax Barsonax changed the title Feature/container reuse Prepare for container reuse Apr 5, 2024
@Barsonax Barsonax merged commit bd923eb into master Apr 5, 2024
11 checks passed
@Barsonax Barsonax linked an issue Apr 5, 2024 that may be closed by this pull request
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.

Reuse database container
1 participant