]> source.dussan.org Git - poi.git/commitdiff
Exclude some files in one test to avoid flakiness during parallel builds
authorDominik Stadler <centic@apache.org>
Tue, 1 Aug 2023 08:24:59 +0000 (08:24 +0000)
committerDominik Stadler <centic@apache.org>
Tue, 1 Aug 2023 08:24:59 +0000 (08:24 +0000)
This test failed once locally due to a temporary file
being deleted again when the test tried to access it

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911384 13f79535-47bb-0310-9956-ffa450edef68

poi/src/test/java/org/apache/poi/hpsf/basic/TestReadAllFiles.java

index 4cf5a31eb70014035c9f1577baf6b19982ee1800..395aab02cfa04903788985f9812d9685b8e89e80 100644 (file)
@@ -60,7 +60,12 @@ class TestReadAllFiles {
         Objects.requireNonNull(files, "Could not find directory " + hpsfTestDir.getAbsolutePath());
 
         // convert to list of object-arrays for @Parameterized
-        return Arrays.stream(files).map(Arguments::of);
+        return Arrays.
+                stream(files).
+                // exclude some files which can be created by other parallel tests,
+                // but then might not exist any more when they are processed here
+                filter(file -> !file.getName().endsWith("-saved.xls")).
+                map(Arguments::of);
     }
 
     /**