directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r679639 - /directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/
Date Fri, 25 Jul 2008 00:49:21 GMT
Author: elecharny
Date: Thu Jul 24 17:49:21 2008
New Revision: 679639

URL: http://svn.apache.org/viewvc?rev=679639&view=rev
Log:
More file cleaning when tests are done.
Removed useless imports

Modified:
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmBrowserBugTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursorTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursorTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursorTest.java

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmBrowserBugTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmBrowserBugTest.java?rev=679639&r1=679638&r2=679639&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmBrowserBugTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmBrowserBugTest.java
Thu Jul 24 17:49:21 2008
@@ -87,13 +87,13 @@
         recman = null;
         bt = null;
         
-        String fileToDelete = dbFile.getAbsolutePath();
-        new File( fileToDelete ).delete();
-        new File( fileToDelete + ".db" ).delete();
-        new File( fileToDelete + ".lg" ).delete();
-
         if ( dbFile.exists() )
         {
+            String fileToDelete = dbFile.getAbsolutePath();
+            new File( fileToDelete ).delete();
+            new File( fileToDelete + ".db" ).delete();
+            new File( fileToDelete + ".lg" ).delete();
+
             dbFile.delete();
         }
         

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursorTest.java?rev=679639&r1=679638&r2=679639&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursorTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyBTreeCursorTest.java
Thu Jul 24 17:49:21 2008
@@ -100,6 +100,11 @@
         recman.close();
         recman = null;
         dbFile.deleteOnExit();
+
+        String fileToDelete = dbFile.getAbsolutePath();
+        new File( fileToDelete + ".db" ).delete();
+        new File( fileToDelete + ".lg" ).delete();
+
         dbFile = null;
     }
 

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java?rev=679639&r1=679638&r2=679639&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyCursorTest.java
Thu Jul 24 17:49:21 2008
@@ -100,6 +100,11 @@
         recman.close();
         recman = null;
         dbFile.deleteOnExit();
+
+        String fileToDelete = dbFile.getAbsolutePath();
+        new File( fileToDelete + ".db" ).delete();
+        new File( fileToDelete + ".lg" ).delete();
+
         dbFile = null;
     }
 

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursorTest.java?rev=679639&r1=679638&r2=679639&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursorTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleBTreeCursorTest.java
Thu Jul 24 17:49:21 2008
@@ -39,6 +39,7 @@
 import org.apache.directory.server.schema.registries.ComparatorRegistry;
 import org.apache.directory.server.xdbm.Tuple;
 import org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -55,6 +56,8 @@
     JdbmTable<Integer,Integer> table;
     Comparator<Integer> comparator;
     KeyTupleBTreeCursor<Integer, Integer> cursor;
+    File dbFile;
+    RecordManager recman;
     
     private static final Integer KEY = 1;
     private static final String TEST_OUTPUT_PATH = "test.output.path";
@@ -78,8 +81,8 @@
             tmpDir = new File( System.getProperty( TEST_OUTPUT_PATH ) );
         }
 
-        File dbFile = File.createTempFile( getClass().getSimpleName(), "db", tmpDir );
-        RecordManager recman = new BaseRecordManager( dbFile.getAbsolutePath() );
+        dbFile = File.createTempFile( getClass().getSimpleName(), "db", tmpDir );
+        recman = new BaseRecordManager( dbFile.getAbsolutePath() );
         
         SerializableComparator.setRegistry( new MockComparatorRegistry() );
         
@@ -92,6 +95,21 @@
     }
     
     
+    @After 
+    public void destroytable() throws Exception
+    {
+        recman.close();
+        recman = null;
+        dbFile.deleteOnExit();
+
+        String fileToDelete = dbFile.getAbsolutePath();
+        new File( fileToDelete + ".db" ).delete();
+        new File( fileToDelete + ".lg" ).delete();
+
+        dbFile = null;
+    }
+    
+
     @Test( expected = InvalidCursorPositionException.class )
     public void testEmptyCursor() throws Exception
     {

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursorTest.java?rev=679639&r1=679638&r2=679639&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursorTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/NoDupsCursorTest.java
Thu Jul 24 17:49:21 2008
@@ -88,6 +88,9 @@
         recman.close();
         recman = null;
         dbFile.deleteOnExit();
+        String fileToDelete = dbFile.getAbsolutePath();
+        new File( fileToDelete + ".db" ).delete();
+        new File( fileToDelete + ".lg" ).delete();
         dbFile = null;
     }
 



Mime
View raw message