From c51127558038f1c6b39e4a7f75bfdec9ac3d9fba Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 2 Nov 2020 11:47:49 -0600 Subject: [PATCH] Provide more detail in test failure on CI Signed-off-by: Joakim Erdfelt --- .../org/eclipse/jetty/webapp/WebInfConfigurationTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java index d5a3c20a738e..962c0eb8e054 100644 --- a/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java +++ b/jetty-webapp/src/test/java/org/eclipse/jetty/webapp/WebInfConfigurationTest.java @@ -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; @@ -72,7 +73,7 @@ public void testFindAndFilterContainerPaths() context.setClassLoader(loader); config.findAndFilterContainerPaths(context); List 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")); } @@ -93,7 +94,7 @@ public void testFindAndFilterContainerPathsJDK9() context.setClassLoader(loader); config.findAndFilterContainerPaths(context); List 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(); @@ -121,7 +122,7 @@ public void testFindAndFilterContainerPathsTarget8() context.setClassLoader(loader); config.findAndFilterContainerPaths(context); List 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")); }