You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2010/10/03 16:18:11 UTC

svn commit: r1003969 - /directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java

Author: kayyagari
Date: Sun Oct  3 14:18:11 2010
New Revision: 1003969

URL: http://svn.apache.org/viewvc?rev=1003969&view=rev
Log:
o added a assertion for checking the use of ParentIdAndRdnComparator of RDN index 

Modified:
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java?rev=1003969&r1=1003968&r2=1003969&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java Sun Oct  3 14:18:11 2010
@@ -285,13 +285,19 @@ public class JdbmRdnIndexTest
     {
         initIndex();
         
-        ParentIdAndRdn<Long> key = new ParentIdAndRdn<Long>( 0L, new RDN( "cn=key" ) );
+        ParentIdAndRdn<Long> key = new ParentIdAndRdn<Long>( 0L, new RDN( "cn=key", schemaManager ) );
         
         assertNull( idx.forwardLookup( key ) );
 
         idx.add( key, 0l );
         assertEquals( 0, ( long ) idx.forwardLookup( key ) );
         assertEquals( key, idx.reverseLookup( 0l ) );
+        
+        // check with the different case in UP name, this ensures that the custom
+        // key comparator is used
+        key = new ParentIdAndRdn<Long>( 0L, new RDN( "cn=KEY", schemaManager ) );
+        assertEquals( 0, ( long ) idx.forwardLookup( key ) );
+        assertEquals( key, idx.reverseLookup( 0l ) );
     }