spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.37k stars 40.72k forks source link

Document known testcontainers lifecycle issues #35236

Open philwebb opened 1 year ago

philwebb commented 1 year ago

See https://github.com/spring-projects/spring-boot/issues/35223#issuecomment-1531061583

scottfrederick commented 10 months ago

@AdrianHarenczyk Thanks for getting in touch. Your question seems off-topic for this issue related to documentation, and as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. This feels like a question that would be better suited to Stack Overflow. Please post your question there.

wilkinsona commented 1 month ago

We should also document problems that can be caused by the combination of using @Testcontainers and the test context framework's caching. The former will stop containers in an after all callback, whereas the latter may cache a context that will then be reused later on and will attempt to access a service in an already-stopped container. See #42854 for an example of this problem.