directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r653868 - /directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursorTest.java
Date Tue, 06 May 2008 18:19:25 GMT
Author: kayyagari
Date: Tue May  6 11:19:25 2008
New Revision: 653868

URL: http://svn.apache.org/viewvc?rev=653868&view=rev
Log:
fixed the broken test testOnTableWithMultipleEntries

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

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursorTest.java?rev=653868&r1=653867&r2=653868&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursorTest.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsContainerCursorTest.java
Tue May  6 11:19:25 2008
@@ -185,10 +185,11 @@
 
         cursor.last();
         cursor.next();
-        tuple = cursor.get();
+        assertFalse( cursor.available() );
+       /* tuple = cursor.get();
         assertTrue( tuple.getKey().equals( 9 ) );
-        assertEquals( 9, ( int ) tuple.getValue().getAvlTree().getFirst().getKey() );
-
+        assertEquals( 9, ( int ) tuple.getValue().getAvlTree().getFirst().getKey() ); */
+        
         cursor.beforeFirst();
         cursor.next();
         tuple = cursor.get();
@@ -204,12 +205,12 @@
         // just to clear the jdbmTuple value so that line 127 inside after(tuple) method
         // can be executed as part of the below after(tuple) call
         cursor.before(new Tuple<Integer,DupsContainer<Integer>>( 1, null ) );
-        cursor.after( new Tuple<Integer,DupsContainer<Integer>>( 0, null ) );
+        cursor.after( new Tuple<Integer,DupsContainer<Integer>>( 0, null ) );
// this positions on tuple with key 1
 
-        cursor.next();
+        cursor.next(); // this moves onto tuple with key 2
         tuple = cursor.get();
-        assertTrue( tuple.getKey().equals( 1 ) );
-        assertEquals( 1, ( int ) tuple.getValue().getAvlTree().getFirst().getKey() );
+        assertTrue( tuple.getKey().equals( 2 ) );
+        assertEquals( 2, ( int ) tuple.getValue().getAvlTree().getFirst().getKey() );
     }
 
 



Mime
View raw message