Fixed some compilation errors
authorEmmanuel Lécharny <elecharny@apache.org>
Sun, 29 Jun 2014 07:45:37 +0000 (07:45 +0000)
committerEmmanuel Lécharny <elecharny@apache.org>
Sun, 29 Jun 2014 07:45:37 +0000 (07:45 +0000)
mavibot/src/test/java/org/apache/directory/mavibot/btree/InMemoryBulkDataSorterTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeBrowseTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeDuplicateKeyTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedBTreeTransactionTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/PersistedSubBtreeKeyCursorTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerTest.java
mavibot/src/test/java/org/apache/directory/mavibot/btree/RecordManagerWithDuplicatesTest.java

index 51d9eab..d337b22 100644 (file)
@@ -49,6 +49,9 @@ public class InMemoryBulkDataSorterTest
 {
     @Rule
     public TemporaryFolder tempFolder = new TemporaryFolder();
+    
+    /* A counter of tuple files */
+    private int counter = 0;
 
     private Comparator<Tuple<Integer, Integer>> tupleComp = new Comparator<Tuple<Integer, Integer>>()
     {
@@ -69,6 +72,7 @@ public class InMemoryBulkDataSorterTest
         Random random = new Random();
 
         File dataFile = tempFolder.newFile( "tuple.data" );
+        dataFile.deleteOnExit();
         DataOutputStream out = new DataOutputStream( new FileOutputStream( dataFile ) );
 
         Tuple<Integer, Integer>[] arr = ( Tuple<Integer, Integer>[] ) Array.newInstance( Tuple.class, count );
@@ -107,12 +111,14 @@ public class InMemoryBulkDataSorterTest
     }
 
 
-    public void testSortedFileMerge( int count, int splitAfter ) throws IOException
+    private void testSortedFileMerge( int count, int splitAfter ) throws IOException
     {
         IntTupleReaderWriter itrw = new IntTupleReaderWriter();
         Random random = new Random();
 
-        File dataFile = tempFolder.newFile( "tuple.data" );
+        File dataFile = tempFolder.newFile( "tuple.data" + counter );
+        counter++;
+        dataFile.deleteOnExit();
 
         DataOutputStream out = new DataOutputStream( new FileOutputStream( dataFile ) );
 
index 99b4178..5a44d27 100644 (file)
@@ -66,7 +66,7 @@ public class PersistedBTreeBrowseTest
      * Create a BTree for this test
      */
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDir = tempFolder.newFolder( UUID.randomUUID().toString() );
 
index cc38182..c428797 100644 (file)
@@ -64,7 +64,7 @@ public class PersistedBTreeDuplicateKeyTest
 
 
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDir = tempFolder.newFolder( UUID.randomUUID().toString() );
 
index c659aee..250e162 100644 (file)
@@ -53,7 +53,7 @@ public class PersistedBTreeTransactionTest
 
 
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDirWithTxn = tempFolder.newFolder( UUID.randomUUID().toString() );
         dataDirNoTxn = tempFolder.newFolder( UUID.randomUUID().toString() );
index 6542b8d..078176d 100644 (file)
@@ -53,7 +53,7 @@ public class PersistedSubBtreeKeyCursorTest
 
 
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDir = tempFolder.newFolder( UUID.randomUUID().toString() );
 
index 5cccb8c..9d8e1c7 100644 (file)
@@ -65,7 +65,7 @@ public class RecordManagerTest
 
 
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDir = tempFolder.newFolder( UUID.randomUUID().toString() );
 
index 463131b..127a449 100644 (file)
@@ -59,7 +59,7 @@ public class RecordManagerWithDuplicatesTest
 
 
     @Before
-    public void createBTree()
+    public void createBTree() throws IOException
     {
         dataDir = tempFolder.newFolder( UUID.randomUUID().toString() );