Skip to content

Commit

Permalink
Adding chjeck for clean FS mounts before executing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Jun 20, 2024
1 parent 4c55461 commit ecd01ab
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,18 @@
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.UrlEncoded;
import org.eclipse.jetty.util.component.LifeCycle;
import org.eclipse.jetty.util.resource.FileSystemPool;
import org.hamcrest.Matcher;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -124,6 +127,12 @@ protected ContextHandlerCollection createDefaultContextHandlerCollection()
return _contextCollection;
}

@BeforeEach
public void ensureFileSystemPoolIsSane()
{
assertThat(FileSystemPool.INSTANCE.mounts(), empty());
}

@AfterEach
public void destroy() throws Exception
{
Expand Down

0 comments on commit ecd01ab

Please sign in to comment.