Prevent container to be closed twice
See gh-35120
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user