fixed tests to pass on windows by closing the recordmanager first before deleting...
authorKiran Ayyagari <kayyagari@apache.org>
Mon, 11 May 2015 08:11:31 +0000 (08:11 +0000)
committerKiran Ayyagari <kayyagari@apache.org>
Mon, 11 May 2015 08:11:31 +0000 (08:11 +0000)
mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeTransactionTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerFreePageTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java

index 250e162..b8abe96 100644 (file)
@@ -79,6 +79,12 @@ public class PersistedBTreeTransactionTest
         btreeNoTransactions.close();
         btreeWithTransactions.close();
 
+        recordManagerNoTxn.close();
+        recordManagerTxn.close();
+        
+        assertTrue( recordManagerNoTxn.isContextOk() );
+        assertTrue( recordManagerTxn.isContextOk() );
+
         if ( dataDirNoTxn.exists() )
         {
             FileUtils.deleteDirectory( dataDirNoTxn );
@@ -88,12 +94,6 @@ public class PersistedBTreeTransactionTest
         {
             FileUtils.deleteDirectory( dataDirWithTxn );
         }
-        
-        recordManagerNoTxn.close();
-        recordManagerTxn.close();
-        
-        assertTrue( recordManagerNoTxn.isContextOk() );
-        assertTrue( recordManagerTxn.isContextOk() );
     }
 
 
index 3e0e1c1..314b768 100644 (file)
@@ -84,14 +84,13 @@ public class RecordManagerFreePageTest
 
         btree.close();
 
+        recordManager1.close();
+        assertTrue( recordManager1.isContextOk() );
+
         if ( dataDir.exists() )
         {
             FileUtils.deleteDirectory( dataDir );
         }
-
-        recordManager1.close();
-        
-        assertTrue( recordManager1.isContextOk() );
     }
 
 
index 9891fbb..d2dd085 100644 (file)
@@ -88,6 +88,8 @@ public class RecordManagerTest
     {
         btree.close();
 
+        recordManager.close();
+        
         if ( dataDir.exists() )
         {
             FileUtils.deleteDirectory( dataDir );
index 1bce2a1..cd83696 100644 (file)
@@ -82,13 +82,13 @@ public class RecordManagerWithDuplicatesTest
     {
         btree.close();
 
+        recordManager.close();
+        assertTrue( recordManager.isContextOk() );
+
         if ( dataDir.exists() )
         {
             FileUtils.deleteDirectory( dataDir );
         }
-
-        recordManager.close();
-        assertTrue( recordManager.isContextOk() );
     }