directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r751698 - /directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java
Date Mon, 09 Mar 2009 14:57:37 GMT
Author: felixk
Date: Mon Mar  9 14:57:35 2009
New Revision: 751698

URL: http://svn.apache.org/viewvc?rev=751698&view=rev
Log:
Use OS specific tmp directory

Modified:
    directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java

Modified: directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java?rev=751698&r1=751697&r2=751698&view=diff
==============================================================================
--- directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java
(original)
+++ directory/apacheds/trunk/server-xml/src/test/java/org/apache/directory/server/SpringServerTest.java
Mon Mar  9 14:57:35 2009
@@ -182,13 +182,13 @@
         File workingDirFile = new File( configF.getParentFile(), "work" );
         apacheDS.getDirectoryService().setWorkingDirectory( workingDirFile );
         
-        // Now, launch the server, and check that the ObjectClass index has been created
in /tmp
+        // Now, launch the server, and check that the ObjectClass index has been created
in OS' tmp directory
         apacheDS.startup();
         
-        File tmpOCdb = new File( "/tmp/objectClass.db");
+        File tmpOCdb = new File( getTmpDir(), "objectClass.db" );
         assertTrue( tmpOCdb.exists() );
 
-        File tmpOClg = new File( "/tmp/objectClass.lg");
+        File tmpOClg = new File( getTmpDir(), "objectClass.lg" );
         assertTrue( tmpOClg.exists() );
         
         // Shutdown and cleanup
@@ -198,4 +198,15 @@
         tmpOCdb.delete();
         tmpOClg.delete();
     }
+    
+    /**
+     * Get tmp dir
+     * 
+     * @return
+     *      The OS specific tmp dir
+     */
+    private File getTmpDir()
+    {
+        return new File( System.getProperty( "java.io.tmpdir" ) );
+    }
 }



Mime
View raw message