]> source.dussan.org Git - poi.git/commitdiff
try to stop poi-integration testing with corrupt file
authorPJ Fanning <fanningpj@apache.org>
Mon, 1 Jul 2024 23:19:33 +0000 (23:19 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 1 Jul 2024 23:19:33 +0000 (23:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918805 13f79535-47bb-0310-9956-ffa450edef68

poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java
poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java

index 1ab7d3dec02ac6717b75c9c0c181b78be8b7b833..c10cf7725e9079ea4bf5754986c785bda8a18804 100644 (file)
@@ -96,6 +96,9 @@ public class TestAllFiles {
         "poifs/protected_sha512.xlsx",
         "poifs/60320-protected.xlsx",
         "poifs/protected_sha512.xlsx",
+
+        // corrupt file
+        "spreadsheet/duplicate-filename.xlsx"
     };
 
     // cheap workaround of skipping the few problematic files
@@ -145,6 +148,9 @@ public class TestAllFiles {
         "poifs/protected_sha512.xlsx",
         "poifs/60320-protected.xlsx",
         "poifs/protected_sha512.xlsx",
+
+        // corrupt file
+        "spreadsheet/duplicate-filename.xlsx"
     };
 
     private static final Set<String> EXPECTED_FAILURES = StressTestUtils.unmodifiableHashSet(
index f2067ed9a0f019d2b1f91db8eb5486c4d3b86adf..adebc94508a011ae3971c2267372f48086a0ef1c 100644 (file)
@@ -188,7 +188,6 @@ public class XSSFFileHandler extends SpreadsheetHandler {
         EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/sample-beta.xlsx");
 
         // corrupt/invalid
-        EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/duplicate-filename.xlsx");
         EXPECTED_ADDITIONAL_FAILURES.add("openxml4j/invalid.xlsx");
     }
 
@@ -204,7 +203,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
             XLSX2CSV.main(new String[]{file.getAbsolutePath()});
             ExcelComparator.main(new String[]{file.getAbsolutePath(), file.getAbsolutePath()});
 
-            assertFalse( EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
+            assertFalse(EXPECTED_ADDITIONAL_FAILURES.contains(testFile), "Expected Extraction to fail for file " + file + " and handler " + this + ", but did not fail!" );
 
         } catch (OLE2NotOfficeXmlFileException e) {
             // we have some files that are not actually OOXML and thus cannot be tested here