From: Dominik Stadler Date: Sun, 28 Jun 2015 19:55:56 +0000 (+0000) Subject: Open file read-only in test to avoid making it dirty during running unit tests X-Git-Tag: REL_3_13_BETA1~72 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6a03e739447da46961f7b40f0a42a509cba9463;p=poi.git Open file read-only in test to avoid making it dirty during running unit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688045 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java index 2f857933e7..a6955958fb 100644 --- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java +++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java @@ -709,13 +709,13 @@ public final class TestPackage { // use values close to, but within the limits ZipSecureFile.setMinInflateRatio(min_ratio-0.002); ZipSecureFile.setMaxEntrySize(max_size+1); - Workbook wb = WorkbookFactory.create(file); + Workbook wb = WorkbookFactory.create(file, null, true); wb.close(); // check ratio out of bounds ZipSecureFile.setMinInflateRatio(min_ratio+0.002); try { - wb = WorkbookFactory.create(file); + wb = WorkbookFactory.create(file, null, true); wb.close(); // this is a bit strange, as there will be different exceptions thrown // depending if this executed via "ant test" or within eclipse