瀏覽代碼

Fix test-failure in Maven builds that I introduced by manually deleting the temporary directory in the test. The Maven build runs these in one process and thus the directory was not re-created any more.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746933 13f79535-47bb-0310-9956-ffa450edef68
pull/33/head
Dominik Stadler 8 年之前
父節點
當前提交
ee222dc91d
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      src/testcases/org/apache/poi/util/TestTempFile.java

+ 8
- 0
src/testcases/org/apache/poi/util/TestTempFile.java 查看文件

@@ -67,6 +67,14 @@ public class TestTempFile {
} else {
System.setProperty(TempFile.JAVA_IO_TMPDIR, previousTempDir);
}

// reset strategy to re-create the directory
TempFile.setTempFileCreationStrategy(new TempFile.DefaultTempFileCreationStrategy());

// check that we can still create a tempfile
File testFile = TempFile.createTempFile("test", ".tst");
assertTrue(testFile.exists());
assertTrue(testFile.delete());
}

@Test

Loading…
取消
儲存