Prevent container to be closed twice

See gh-35120
pull/35166/head
Yanming Zhou 2 years ago committed by Stephane Nicoll
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…
Cancel
Save