directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r949973 - /directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
Date Tue, 01 Jun 2010 09:30:39 GMT
Author: elecharny
Date: Tue Jun  1 09:30:38 2010
New Revision: 949973

URL: http://svn.apache.org/viewvc?rev=949973&view=rev
Log:
Don't use "/tmp". There is a Java property to get the temporary directory.

Modified:
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java?rev=949973&r1=949972&r2=949973&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/GenericIndexTest.java
Tue Jun  1 09:30:38 2010
@@ -46,7 +46,8 @@ public class GenericIndexTest
     @Before
     public void setUp()
     {
-        index = new GenericIndex<String, Long, Long>( "cn", 42, new File( "/tmp" )
);
+        String tmpDir = System.getProperty( "java.io.tmpdir" );
+        index = new GenericIndex<String, Long, Long>( "cn", 42, new File( tmpDir )
);
     }
 
 
@@ -73,11 +74,13 @@ public class GenericIndexTest
     @Test
     public void testConstructor3()
     {
-        index = new GenericIndex<String, Long, Long>( "cn", 42, new File( "/tmp" )
);
+        String tmpDir = System.getProperty( "java.io.tmpdir" );
+
+        index = new GenericIndex<String, Long, Long>( "cn", 42, new File( tmpDir )
);
         assertEquals( "cn", index.getAttributeId() );
         assertEquals( 42, index.getCacheSize() );
         assertNotNull( index.getWkDirPath() );
-        assertEquals( "/tmp", index.getWkDirPath().getPath() );
+        assertEquals( tmpDir, index.getWkDirPath().getPath() );
     }
 
 



Mime
View raw message