Skip to content

Disable TestContext framework's cache in spring-boot-testcontainers #41124

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

Closed
wilkinsona opened this issue Jun 17, 2024 · 0 comments
Closed

Disable TestContext framework's cache in spring-boot-testcontainers #41124

wilkinsona opened this issue Jun 17, 2024 · 0 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@wilkinsona
Copy link
Member

The cache isn't useful in this module as every test class has a different context configuration. We should disable it so that contexts that won't be used again are not cached and do not consume memory beyond the point at which they're no longer needed. Hopefully spring-projects/spring-framework#32289 will allow this change to be reverted in the future.

This change will also help with the mismatched lifecycle of @Testcontainers-managed Container instances and the tests' application contexts. #38237 may address this part of the problem in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant