Skip to content

Commit

Permalink
Provide more detail in test failure on CI
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 Nov 16, 2020
1 parent cc952f3 commit c511275
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.eclipse.jetty.toolchain.test.FS;
Expand Down Expand Up @@ -72,7 +73,7 @@ public void testFindAndFilterContainerPaths()
context.setClassLoader(loader);
config.findAndFilterContainerPaths(context);
List<Resource> containerResources = context.getMetaData().getContainerResources();
assertEquals(1, containerResources.size());
assertEquals(1, containerResources.size(), () -> containerResources.stream().map(Resource::toString).collect(Collectors.joining(",", "[", "]")));
assertThat(containerResources.get(0).toString(), containsString("jetty-util"));
}

Expand All @@ -93,7 +94,7 @@ public void testFindAndFilterContainerPathsJDK9()
context.setClassLoader(loader);
config.findAndFilterContainerPaths(context);
List<Resource> containerResources = context.getMetaData().getContainerResources();
assertEquals(2, containerResources.size());
assertEquals(2, containerResources.size(), () -> containerResources.stream().map(Resource::toString).collect(Collectors.joining(",", "[", "]")));
for (Resource r : containerResources)
{
String s = r.toString();
Expand Down Expand Up @@ -121,7 +122,7 @@ public void testFindAndFilterContainerPathsTarget8()
context.setClassLoader(loader);
config.findAndFilterContainerPaths(context);
List<Resource> containerResources = context.getMetaData().getContainerResources();
assertEquals(1, containerResources.size());
assertEquals(1, containerResources.size(), () -> containerResources.stream().map(Resource::toString).collect(Collectors.joining(",", "[", "]")));
assertThat(containerResources.get(0).toString(), containsString("jetty-util"));
}

Expand Down

0 comments on commit c511275

Please sign in to comment.