cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sea...@apache.org
Subject svn commit: r723791 - /cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java
Date Fri, 05 Dec 2008 17:04:10 GMT
Author: seanoc
Date: Fri Dec  5 09:04:09 2008
New Revision: 723791

URL: http://svn.apache.org/viewvc?rev=723791&view=rev
Log:
Reset java.io.tmpdir system property after test to avoid any potential weirdness.

Modified:
    cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java

Modified: cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java?rev=723791&r1=723790&r2=723791&view=diff
==============================================================================
--- cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java (original)
+++ cxf/trunk/common/common/src/test/java/org/apache/cxf/helpers/FileUtilsTest.java Fri Dec
 5 09:04:09 2008
@@ -11,12 +11,15 @@
     
     @Test
     public void testTempIODirExists() throws Exception {
-
+        
+        String originaltmpdir = System.getProperty("java.io.tmpdir");
         try {
             System.setProperty("java.io.tmpdir", "dummy");
             FileUtils.createTempFile("foo", "bar");
         } catch (RuntimeException e) {
             assertTrue(e.toString().contains("please set java.io.tempdir to an existing directory"));
-        }    
+        } finally {
+            System.setProperty("java.io.tmpdir", originaltmpdir);
+        }
     }
 }



Mime
View raw message