mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Prevent container to be closed twice
See gh-35120
This commit is contained in:
parent
fd6214e7e3
commit
5df6913f18
@ -41,9 +41,7 @@ class TestcontainersLifecycleBeanPostProcessor implements DestructionAwareBeanPo
|
||||
|
||||
@Override
|
||||
public void postProcessBeforeDestruction(Object bean, String beanName) throws BeansException {
|
||||
if (bean instanceof Startable startable) {
|
||||
startable.stop();
|
||||
}
|
||||
// Startable extends AutoCloseable will always be closed by context
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user