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
This commit is contained in:
parent
069d7db9e0
commit
efc96e1d8e
@ -709,13 +709,13 @@ public final class TestPackage {
|
|||||||
// use values close to, but within the limits
|
// use values close to, but within the limits
|
||||||
ZipSecureFile.setMinInflateRatio(min_ratio-0.002);
|
ZipSecureFile.setMinInflateRatio(min_ratio-0.002);
|
||||||
ZipSecureFile.setMaxEntrySize(max_size+1);
|
ZipSecureFile.setMaxEntrySize(max_size+1);
|
||||||
Workbook wb = WorkbookFactory.create(file);
|
Workbook wb = WorkbookFactory.create(file, null, true);
|
||||||
wb.close();
|
wb.close();
|
||||||
|
|
||||||
// check ratio out of bounds
|
// check ratio out of bounds
|
||||||
ZipSecureFile.setMinInflateRatio(min_ratio+0.002);
|
ZipSecureFile.setMinInflateRatio(min_ratio+0.002);
|
||||||
try {
|
try {
|
||||||
wb = WorkbookFactory.create(file);
|
wb = WorkbookFactory.create(file, null, true);
|
||||||
wb.close();
|
wb.close();
|
||||||
// this is a bit strange, as there will be different exceptions thrown
|
// this is a bit strange, as there will be different exceptions thrown
|
||||||
// depending if this executed via "ant test" or within eclipse
|
// depending if this executed via "ant test" or within eclipse
|
||||||
|
Loading…
Reference in New Issue
Block a user