directory-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=679635&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/JdbmIndexTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.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=679635&r1=679634&r2=679635&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:31:53 2008
@@ -86,10 +86,17 @@
         recman.close();
         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() )
         {
             dbFile.delete();
         }
+        
         dbFile = null;
     }
 

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.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/JdbmIndexTest.java?rev=679635&r1=679634&r2=679635&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
Thu Jul 24 17:31:53 2008
@@ -23,9 +23,13 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.After;
-import static org.junit.Assert.*;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.directory.server.schema.bootstrap.*;
 import org.apache.directory.server.schema.registries.*;
 import org.apache.directory.server.schema.SerializableComparator;
@@ -90,6 +94,11 @@
     {
         registry = null;
         destroyIndex();
+        
+        if ( ( dbFileDir != null ) && dbFileDir.exists() )
+        {
+            FileUtils.deleteDirectory( dbFileDir );
+        }
     }
 
 
@@ -102,6 +111,7 @@
             File file = new File( idx.getWkDirPath(), idx.getAttribute().getName() + ".db"
);
             file.delete();
         }
+        
         idx = null;
     }
 

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.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/JdbmMasterTableTest.java?rev=679635&r1=679634&r2=679635&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTableTest.java
Thu Jul 24 17:31:53 2008
@@ -91,7 +91,7 @@
         table = new JdbmMasterTable<Integer>( recman, registries );
         LOG.debug( "Created new table and populated it with data" );
 
-        JdbmMasterTable t2 = new JdbmMasterTable<Integer>( recman, registries );
+        JdbmMasterTable<Integer> t2 = new JdbmMasterTable<Integer>( recman, registries
);
         t2.close();
     }
 
@@ -115,6 +115,10 @@
 
         if ( dbFile != null )
         {
+            String fileToDelete = dbFile.getAbsolutePath();
+            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/JdbmStoreTest.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/JdbmStoreTest.java?rev=679635&r1=679634&r2=679635&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Thu Jul 24 17:31:53 2008
@@ -24,7 +24,6 @@
 import org.slf4j.LoggerFactory;
 import org.junit.Before;
 import org.junit.After;
-import org.junit.Ignore;
 import org.junit.Test;
 import static org.junit.Assert.*;
 import org.apache.commons.io.FileUtils;
@@ -103,7 +102,7 @@
     @Before
     public void createStore() throws Exception
     {
-        destryStore();
+        destroyStore();
 
         // setup the working directory for the store
         wkdir = File.createTempFile( getClass().getSimpleName(), "db" );
@@ -126,7 +125,7 @@
 
 
     @After
-    public void destryStore() throws Exception
+    public void destroyStore() throws Exception
     {
         if ( store != null )
         {
@@ -134,6 +133,7 @@
         }
 
         store = null;
+        
         if ( wkdir != null )
         {
             FileUtils.deleteDirectory( wkdir );

Modified: directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.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/JdbmTableNoDuplicatesTest.java?rev=679635&r1=679634&r2=679635&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDuplicatesTest.java
Thu Jul 24 17:31:53 2008
@@ -27,7 +27,6 @@
 import static org.junit.Assert.*;
 
 import org.apache.directory.server.xdbm.Table;
-import org.apache.directory.server.xdbm.TupleRenderer;
 import org.apache.directory.server.schema.SerializableComparator;
 import org.apache.directory.server.schema.registries.ComparatorRegistry;
 import org.apache.directory.shared.ldap.schema.syntax.ComparatorDescription;
@@ -97,6 +96,10 @@
 
         if ( dbFile != null )
         {
+            String fileToDelete = dbFile.getAbsolutePath();
+            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/JdbmTableWithDuplicatesTest.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/JdbmTableWithDuplicatesTest.java?rev=679635&r1=679634&r2=679635&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
(original)
+++ directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableWithDuplicatesTest.java
Thu Jul 24 17:31:53 2008
@@ -27,7 +27,6 @@
 import static org.junit.Assert.*;
 
 import org.apache.directory.server.xdbm.Table;
-import org.apache.directory.server.xdbm.TupleRenderer;
 import org.apache.directory.server.xdbm.Tuple;
 import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.schema.SerializableComparator;
@@ -105,6 +104,10 @@
 
         if ( dbFile != null )
         {
+            String fileToDelete = dbFile.getAbsolutePath();
+            new File( fileToDelete + ".db" ).delete();
+            new File( fileToDelete + ".lg" ).delete();
+
             dbFile.delete();
         }
 
@@ -312,11 +315,11 @@
         }
 
         Cursor<Tuple<Integer, Integer>> cursor = table.cursor();
-        System.out.println( "remaining ..." );
+        //System.out.println( "remaining ..." );
         cursor.beforeFirst();
         while ( cursor.next() )
         {
-            System.out.println( cursor.get() );
+            //System.out.println( cursor.get() );
         }
 
         assertFalse( table.hasLessOrEqual( 1 ) );



Mime
View raw message