Good point Dan, will do so. thanks, Seán.
> -----Original Message----- > From: Daniel Kulp [mailto:[EMAIL PROTECTED] > Sent: 05 December 2008 16:55 > To: [email protected] > Cc: Sean O'Callaghan > Subject: Re: svn commit: r723778 - in /cxf/trunk/common/common/src: > main/java/org/apache/cxf/helpers/FileUtils.java > test/java/org/apache/cxf/helpers/FileUtilsTest.java > > > > Sean, > > > On Friday 05 December 2008 11:02:52 am [EMAIL PROTECTED] wrote: > > +public class FileUtilsTest extends Assert { > > + > > + > > + @Test > > + public void testTempIODirExists() throws Exception { > > + > > + 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")); + } > > + } > > +} > > Most likely, you should get the original java.io.tmpdir value > and restore it > in a finally block. I'm not sure what would happen if your > test runs before > other tests as the tmpdir value would then point to a > non-existent location. > Restoring it to the previous value should prevent any strange issues. > > > -- > Daniel Kulp > [EMAIL PROTECTED] > http://dankulp.com/blog >
