One test stores and deletes files named "-saved.xls", so
we need to prevent other tests from reading those
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@
1899077 13f79535-47bb-0310-9956-
ffa450edef68
final List<Arguments> result = new ArrayList<>(100);
for (String file : scanner.getIncludedFiles()) {
// avoid running on files leftover from previous failed runs
+ // or being created by tests run in parallel
if(file.endsWith("-saved.xls") || file.endsWith("TestHPSFWritingFunctionality.doc")) {
continue;
}
@ParameterizedTest
@MethodSource("files")
void testMain(File file, Class<? extends Throwable> t) throws Exception {
+ // avoid running files leftover from previous failed runs
+ // or created by tests running in parallel
+ // otherwise this would cause sporadic failures with
+ // parallel test execution
+ if(file.getName().endsWith("-saved.xls")) {
+ return;
+ }
+
Executable ex = () -> runOneFile(file);
if (t == null) {
assertDoesNotThrow(ex);