]> source.dussan.org Git - poi.git/commitdiff
Open file read-only in test to avoid making it dirty during running unit tests
authorDominik Stadler <centic@apache.org>
Sun, 28 Jun 2015 19:55:56 +0000 (19:55 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 28 Jun 2015 19:55:56 +0000 (19:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1688045 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java

index 2f857933e73409e6c9c2f448fd45537780fe8291..a6955958fbfb1b4c4fafc5d7037b20bda18cfa0f 100644 (file)
@@ -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