diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-07-01 23:19:33 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-07-01 23:19:33 +0000 |
commit | 66f89c50d61d7fe6361eb85ec3d9af55e73f3e02 (patch) | |
tree | 85f7257d5d0b0d1afda42eb8c99a6b679b885cbe /poi-integration | |
parent | 7e86ff1bb03123b90c9b3f40c8c5ab3355980b13 (diff) | |
download | poi-66f89c50d61d7fe6361eb85ec3d9af55e73f3e02.tar.gz poi-66f89c50d61d7fe6361eb85ec3d9af55e73f3e02.zip |
try to stop poi-integration testing with corrupt file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918805 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration')
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java | 6 | ||||
-rw-r--r-- | poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java index 1ab7d3dec0..c10cf7725e 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/TestAllFiles.java @@ -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( diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java index f2067ed9a0..adebc94508 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java @@ -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 |