directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1003969 - /directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmRdnIndexTest.java
Date Sun, 03 Oct 2010 14:18:11 GMT
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 ) );
     }
 
 



Mime
View raw message