Skip to content

Commit

Permalink
Issue #5129 - testExtraClasspathGlob to use source reference
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Aug 10, 2020
1 parent 328e0e1 commit 54f888c
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -118,10 +118,7 @@ public void testExtraClasspathGlob(String extraClasspathGlobReference) throws Ex
context.setContextPath("/");
Path warPath = MavenTestingUtils.getTestResourcePathFile("wars/dump.war");
context.setBaseResource(new PathResource(warPath));
Path extLibsDir = MavenTestingUtils.getTestResourcePathDir("ext");
extLibsDir = extLibsDir.toAbsolutePath();
String extLibsDirGlob = extLibsDir.toString() + File.separator + "*";
context.setExtraClasspath(extLibsDirGlob);
context.setExtraClasspath(extraClasspathGlobReference);

server.setHandler(context);
server.start();
Expand All @@ -133,6 +130,8 @@ public void testExtraClasspathGlob(String extraClasspathGlobReference) throws Ex
ClassLoader contextClassLoader = context.getClassLoader();
assertThat(contextClassLoader, instanceOf(WebAppClassLoader.class));
WebAppClassLoader webAppClassLoader = (WebAppClassLoader)contextClassLoader;
Path extLibsDir = MavenTestingUtils.getTestResourcePathDir("ext");
extLibsDir = extLibsDir.toAbsolutePath();
List<Path> expectedPaths = Files.list(extLibsDir)
.filter((path) -> path.toString().endsWith(".jar"))
.collect(Collectors.toList());
Expand Down

0 comments on commit 54f888c

Please sign in to comment.