directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1376380 - /directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Date Thu, 23 Aug 2012 06:23:55 GMT
Author: elecharny
Date: Thu Aug 23 06:23:55 2012
New Revision: 1376380

URL: http://svn.apache.org/viewvc?rev=1376380&view=rev
Log:
Replaced the call to JdbmIndx( name ) for a call to JdbmIndx( name, reverse )

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

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1376380&r1=1376379&r2=1376380&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Thu Aug 23 06:23:55 2012
@@ -147,11 +147,11 @@ public class JdbmStoreTest
         store.setPartitionPath( wkdir.toURI() );
         store.setSyncOnWrite( false );
 
-        JdbmIndex ouIndex = new JdbmIndex( SchemaConstants.OU_AT_OID );
+        JdbmIndex ouIndex = new JdbmIndex( SchemaConstants.OU_AT_OID, false );
         ouIndex.setWkDirPath( wkdir.toURI() );
         store.addIndex( ouIndex );
 
-        JdbmIndex uidIndex = new JdbmIndex( SchemaConstants.UID_AT_OID );
+        JdbmIndex uidIndex = new JdbmIndex( SchemaConstants.UID_AT_OID, false );
         uidIndex.setWkDirPath( wkdir.toURI() );
         store.addIndex( uidIndex );
 
@@ -204,8 +204,8 @@ public class JdbmStoreTest
         store2.setCacheSize( 10 );
         store2.setPartitionPath( wkdir2.toURI() );
         store2.setSyncOnWrite( false );
-        store2.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store2.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID ) );
+        store2.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID, false ) );
+        store2.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID, false ) );
         store2.setSuffixDn( EXAMPLE_COM );
         store2.initialize();
 
@@ -237,7 +237,8 @@ public class JdbmStoreTest
         jdbmPartition.setSyncOnWrite( true ); // for code coverage
 
         assertNull( jdbmPartition.getAliasIndex() );
-        Index<String, Entry, Long> index = new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID
);
+        Index<String, Entry, Long> index = new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID,
+            true );
         ( ( Store<Entry, Long> ) jdbmPartition ).addIndex( index );
         assertNotNull( jdbmPartition.getAliasIndex() );
 
@@ -246,7 +247,7 @@ public class JdbmStoreTest
         assertEquals( 24, jdbmPartition.getCacheSize() );
 
         assertNull( jdbmPartition.getPresenceIndex() );
-        jdbmPartition.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID
) );
+        jdbmPartition.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID,
false ) );
         assertNotNull( jdbmPartition.getPresenceIndex() );
 
         assertNull( jdbmPartition.getId() );
@@ -259,11 +260,11 @@ public class JdbmStoreTest
 
         assertNull( jdbmPartition.getOneAliasIndex() );
         ( ( Store<Entry, Long> ) jdbmPartition ).addIndex( new JdbmIndex<Long, Entry>(
-            ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) );
+            ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
         assertNotNull( jdbmPartition.getOneAliasIndex() );
 
         assertNull( jdbmPartition.getSubAliasIndex() );
-        jdbmPartition.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID
) );
+        jdbmPartition.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID,
true ) );
         assertNotNull( jdbmPartition.getSubAliasIndex() );
 
         assertNull( jdbmPartition.getSuffixDn() );
@@ -273,7 +274,7 @@ public class JdbmStoreTest
         assertNotNull( jdbmPartition.getSuffixDn() );
 
         assertFalse( jdbmPartition.getUserIndices().hasNext() );
-        jdbmPartition.addIndex( new JdbmIndex<Object, Entry>( "2.5.4.3" ) );
+        jdbmPartition.addIndex( new JdbmIndex<Object, Entry>( "2.5.4.3", false ) );
         assertEquals( true, jdbmPartition.getUserIndices().hasNext() );
 
         assertNull( jdbmPartition.getPartitionPath() );
@@ -297,7 +298,7 @@ public class JdbmStoreTest
         assertNotNull( store.getAliasIndex() );
         try
         {
-            store.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID
) );
+            store.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID,
true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -316,7 +317,7 @@ public class JdbmStoreTest
         assertNotNull( store.getPresenceIndex() );
         try
         {
-            store.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID
) );
+            store.addIndex( new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_PRESENCE_AT_OID,
false ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -348,7 +349,7 @@ public class JdbmStoreTest
         assertNotNull( store.getOneAliasIndex() );
         try
         {
-            store.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID
) );
+            store.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID,
true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -358,7 +359,7 @@ public class JdbmStoreTest
         assertNotNull( store.getSubAliasIndex() );
         try
         {
-            store.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID
) );
+            store.addIndex( new JdbmIndex<Long, Entry>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID,
true ) );
             fail();
         }
         catch ( IllegalStateException e )
@@ -789,7 +790,7 @@ public class JdbmStoreTest
         store.setPartitionPath( wkdir.toURI() );
         store.setSyncOnWrite( false );
         // do not add ou index this time
-        store.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID ) );
+        store.addIndex( new JdbmIndex( SchemaConstants.UID_AT_OID, false ) );
 
         Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
         store.setSuffixDn( suffixDn );



Mime
View raw message