Increasing reliability of test when run on different filesystems
This commit is contained in:
parent
5ae363d4e1
commit
2be5a2bda4
|
@ -30,6 +30,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class ClassMatcherTest
|
||||
|
@ -212,15 +213,15 @@ public class ClassMatcherTest
|
|||
{
|
||||
// jar from JVM classloader
|
||||
URI modString = TypeUtil.getLocationOfClass(String.class);
|
||||
// System.err.println(modString);
|
||||
assertNotNull(modString);
|
||||
|
||||
// a jar from maven repo jar
|
||||
URI locJunit = TypeUtil.getLocationOfClass(Test.class);
|
||||
// System.err.println(locJunit);
|
||||
assertNotNull(locJunit);
|
||||
|
||||
// class file
|
||||
URI locTest = TypeUtil.getLocationOfClass(ClassMatcherTest.class);
|
||||
// System.err.println(locTest);
|
||||
assertNotNull(locTest);
|
||||
|
||||
ClassMatcher pattern = new ClassMatcher();
|
||||
|
||||
|
@ -235,7 +236,7 @@ public class ClassMatcherTest
|
|||
pattern.exclude("jrt:/java.base/");
|
||||
|
||||
// Add jar for individual class and classes directory
|
||||
pattern.exclude(locJunit.toString(), locTest.toString());
|
||||
pattern.exclude(locJunit.toASCIIString(), locTest.toASCIIString());
|
||||
|
||||
assertThat(pattern.match(String.class), is(false));
|
||||
assertThat(pattern.match(Test.class), is(false));
|
||||
|
|
Loading…
Reference in New Issue