Author: elecharny
Date: Mon Dec 17 16:17:39 2012
New Revision: 1423002

URL: http://svn.apache.org/viewvc?rev=1423002&view=rev
Log:
Create a smaller file (1M instead of 5M)

Modified:
    
labs/mavibot/trunk/mavibot/src/test/java/org/apache/mavibot/btree/BTreeFlushTest.java

Modified: 
labs/mavibot/trunk/mavibot/src/test/java/org/apache/mavibot/btree/BTreeFlushTest.java
URL: 
http://svn.apache.org/viewvc/labs/mavibot/trunk/mavibot/src/test/java/org/apache/mavibot/btree/BTreeFlushTest.java?rev=1423002&r1=1423001&r2=1423002&view=diff
==============================================================================
--- 
labs/mavibot/trunk/mavibot/src/test/java/org/apache/mavibot/btree/BTreeFlushTest.java
 (original)
+++ 
labs/mavibot/trunk/mavibot/src/test/java/org/apache/mavibot/btree/BTreeFlushTest.java
 Mon Dec 17 16:17:39 2012
@@ -43,8 +43,8 @@ import org.junit.Test;
  */
 public class BTreeFlushTest
 {
-    /** A file containing 5 million elements */
-    private static String data5M;
+    /** A file containing 1 million elements */
+    private static String data1M;
 
     // Some values to inject in a btree
     private static int[] sortedValues = new int[]
@@ -115,7 +115,7 @@ public class BTreeFlushTest
     };
 
 
-    private static void create5MElementsFile() throws IOException
+    private static void create1MElementsFile() throws IOException
     {
         Random random = new Random( System.nanoTime() );
 
@@ -124,7 +124,7 @@ public class BTreeFlushTest
         long l1 = System.currentTimeMillis();
         int n = 0;
         long delta = l1;
-        int nbElems = 5000000;
+        int nbElems = 1000000;
 
         BTree<Long, String> btree = new BTree<Long, String>( new 
LongComparator(),
             new DefaultSerializer<Long, String>( Long.class, String.class ) );
@@ -181,14 +181,14 @@ public class BTreeFlushTest
         System.out.println( "Time to flush 5 million elements : " + ( t1 - t0 
) + "ms" );
         btree.close();
 
-        data5M = tempFile.getCanonicalPath();
+        data1M = tempFile.getCanonicalPath();
     }
 
 
     @BeforeClass
     public static void setup() throws IOException
     {
-        create5MElementsFile();
+        create1MElementsFile();
     }
 
 
@@ -293,7 +293,7 @@ public class BTreeFlushTest
     @Test
     public void testLoadBTreeFromFile() throws Exception
     {
-        File dataFile = new File( data5M );
+        File dataFile = new File( data1M );
         BTree<Long, String> btree = new BTree<Long, String>(
             dataFile.getParent(),
             dataFile.getName(),



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to