directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r660319 - /directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Date Mon, 26 May 2008 21:41:40 GMT
Author: akarasulu
Date: Mon May 26 14:41:37 2008
New Revision: 660319

URL: http://svn.apache.org/viewvc?rev=660319&view=rev
Log:
fixing tests after adding {self:self} tuple in sublevel index

Modified:
    directory/apacheds/branches/bigbang/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java

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=660319&r1=660318&r2=660319&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
Mon May 26 14:41:37 2008
@@ -383,11 +383,14 @@
     {
       Index idx = store.getSubLevelIndex();
       
-      assertEquals( 8, idx.count() );
+      assertEquals( 19, idx.count() );
       
       Cursor<IndexEntry<Long,Attributes>> cursor = idx.forwardCursor( 2L );
       
       assertTrue( cursor.next() );
+      assertEquals( 2, ( long ) cursor.get().getId() );
+      
+      assertTrue( cursor.next() );
       assertEquals( 5, ( long ) cursor.get().getId() );
       
       assertTrue( cursor.next() );
@@ -400,6 +403,9 @@
       cursor = idx.forwardCursor( 2L );
 
       assertTrue( cursor.next() );
+      assertEquals( 2, ( long ) cursor.get().getId() );
+      
+      assertTrue( cursor.next() );
       assertEquals( 6, ( long ) cursor.get().getId() );
       
       assertFalse( cursor.next() );
@@ -448,11 +454,29 @@
 
       cursor = idx.forwardCursor( 3L);
       cursor.afterLast();
+
       assertTrue( cursor.previous() );
       assertEquals( 14, ( long ) cursor.get().getId() );
       
       assertTrue( cursor.previous() );
       assertEquals( 13, ( long ) cursor.get().getId() );
+
+      assertTrue( cursor.previous() );
+      assertEquals( 12, ( long ) cursor.get().getId() );
+
+      assertTrue( cursor.previous() );
+      assertEquals( 10, ( long ) cursor.get().getId() );
+
+      assertTrue( cursor.previous() );
+      assertEquals( 9, ( long ) cursor.get().getId() );
+
+      assertTrue( cursor.previous() );
+      assertEquals( 7, ( long ) cursor.get().getId() );
+
+      assertTrue( cursor.previous() );
+      assertEquals( 3, ( long ) cursor.get().getId() );
+      
+      assertFalse( cursor.previous() );
     }
    
     



Mime
View raw message