]> source.dussan.org Git - poi.git/commitdiff
Fix test-failure in Maven builds that I introduced by manually deleting the temporary...
authorDominik Stadler <centic@apache.org>
Sun, 5 Jun 2016 16:55:48 +0000 (16:55 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 5 Jun 2016 16:55:48 +0000 (16:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1746933 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/util/TestTempFile.java

index 38663480ee20d0e6314654ce74bda91765c67b0e..fbae6577bcf3330aacc1ceb40ffac91d9449b050 100644 (file)
@@ -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