Skip to content

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

@wilkinsona

Description

@wilkinsona

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions