restore mount leak detection (#8457)

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2022-08-13 00:25:39 +02:00 committed by GitHub
parent f4056d6132
commit 01cdfb19d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -65,6 +65,7 @@ import org.slf4j.LoggerFactory;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
@ -84,8 +85,7 @@ public class WebAppContextTest
@BeforeEach
public void beforeEach()
{
if (!FileSystemPool.INSTANCE.mounts().isEmpty())
LOG.warn("Not empty mounts: " + FileSystemPool.INSTANCE.mounts());
assertThat(FileSystemPool.INSTANCE.mounts(), empty());
}
@AfterEach
@ -93,8 +93,7 @@ public class WebAppContextTest
{
lifeCycles.forEach(LifeCycle::stop);
Configurations.cleanKnown();
if (!FileSystemPool.INSTANCE.mounts().isEmpty())
LOG.warn("Not empty mounts: " + FileSystemPool.INSTANCE.mounts());
assertThat(FileSystemPool.INSTANCE.mounts(), empty());
}
private Server newServer()