From 01cdfb19d41bfe8cb5e6d7648b186b0c9527cce7 Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Sat, 13 Aug 2022 00:25:39 +0200 Subject: [PATCH] restore mount leak detection (#8457) Signed-off-by: Ludovic Orban --- .../org/eclipse/jetty/ee10/webapp/WebAppContextTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/jetty-ee10/jetty-ee10-webapp/src/test/java/org/eclipse/jetty/ee10/webapp/WebAppContextTest.java b/jetty-ee10/jetty-ee10-webapp/src/test/java/org/eclipse/jetty/ee10/webapp/WebAppContextTest.java index 406cfc1c997..5a208e28ac1 100644 --- a/jetty-ee10/jetty-ee10-webapp/src/test/java/org/eclipse/jetty/ee10/webapp/WebAppContextTest.java +++ b/jetty-ee10/jetty-ee10-webapp/src/test/java/org/eclipse/jetty/ee10/webapp/WebAppContextTest.java @@ -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()