Skip to content

Commit a43da63

Browse files
jglicktimja
authored andcommitted
Trying to diagnose some flaky tests (#1243)
1 parent b53ea06 commit a43da63

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test-harness/src/test/java/io/jenkins/plugins/casc/ConfigurationAsCodeTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.nio.file.Path;
1818
import java.nio.file.Paths;
1919
import java.nio.file.StandardCopyOption;
20+
import java.util.Arrays;
2021
import java.util.List;
2122
import org.junit.Assume;
2223
import org.junit.Rule;
@@ -86,7 +87,7 @@ public void init_test_from_accepted_sources() throws Exception {
8687

8788
assertThat(casc.configs(exactFile.getAbsolutePath()), hasSize(1));
8889
final List<Path> foo = casc.configs(tempFolder.getRoot().getAbsolutePath());
89-
assertThat(foo, hasSize(6));
90+
assertThat("failed to find 6 configs in " + Arrays.toString(tempFolder.getRoot().list()), foo, hasSize(6));
9091
}
9192

9293
@Test
@@ -99,7 +100,7 @@ public void test_ordered_config_loading() throws Exception {
99100
tempFolder.newFile("z.yaml");
100101

101102
final List<Path> foo = casc.configs(tempFolder.getRoot().getAbsolutePath());
102-
assertThat(foo, hasSize(4));
103+
assertThat("failed to find 4 configs in " + Arrays.toString(tempFolder.getRoot().list()), foo, hasSize(4));
103104
assertTrue(foo.get(0).endsWith("0.yaml"));
104105
assertTrue(foo.get(1).endsWith("1.yaml"));
105106
assertTrue(foo.get(2).endsWith("a.yaml"));

0 commit comments

Comments
 (0)