directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r762538 - in /directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl: AndCursorTest.java GreaterEqTest.java LessEqTest.java
Date Mon, 06 Apr 2009 22:25:12 GMT
Author: akarasulu
Date: Mon Apr  6 22:25:12 2009
New Revision: 762538

URL: http://svn.apache.org/viewvc?rev=762538&view=rev
Log:
fixing breakage in tests against store interface

Modified:
    directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
    directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java

Modified: directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java?rev=762538&r1=762537&r2=762538&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
Mon Apr  6 22:25:12 2009
@@ -47,7 +47,6 @@
 import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.Registries;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
-import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.server.xdbm.tools.StoreUtils;
@@ -74,7 +73,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( AndCursorTest.class.getSimpleName()
);
 
     File wkdir;
-    Store<ServerEntry> store;
+    JdbmStore<ServerEntry> store;
     Registries registries = null;
     AttributeTypeRegistry attributeRegistry;
     EvaluatorBuilder evaluatorBuilder;
@@ -118,8 +117,8 @@
         store.setWorkingDirectory( wkdir );
         store.setSyncOnWrite( false );
 
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
+        store.addIndex( new JdbmIndex<String,ServerEntry>( SchemaConstants.OU_AT_OID
) );
+        store.addIndex( new JdbmIndex<String,ServerEntry>( SchemaConstants.CN_AT_OID
) );
         StoreUtils.loadExampleData( store, registries );
         
         evaluatorBuilder = new EvaluatorBuilder( store, registries );
@@ -181,6 +180,7 @@
     }
     
     
+    @SuppressWarnings("unchecked")
     @Test
     public void testAndCursorWithManualFilter() throws Exception
     {

Modified: directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=762538&r1=762537&r2=762538&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
Mon Apr  6 22:25:12 2009
@@ -22,7 +22,6 @@
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
 import org.apache.directory.server.xdbm.tools.StoreUtils;
 import org.apache.directory.server.schema.registries.*;
@@ -67,7 +66,7 @@
 
 
     File wkdir;
-    Store<ServerEntry> store;
+    JdbmStore<ServerEntry> store;
     Registries registries = null;
     AttributeTypeRegistry attributeRegistry;
 
@@ -110,9 +109,9 @@
         store.setWorkingDirectory( wkdir );
         store.setSyncOnWrite( false );
 
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.POSTALCODE_AT_OID ) );
+        store.addIndex( new JdbmIndex<String,ServerEntry>( SchemaConstants.OU_AT_OID
) );
+        store.addIndex( new JdbmIndex<String,ServerEntry>( SchemaConstants.CN_AT_OID
) );
+        store.addIndex( new JdbmIndex<String,ServerEntry>( SchemaConstants.POSTALCODE_AT_OID
) );
 
         StoreUtils.loadExampleData( store, registries );
         LOG.debug( "Created new store" );
@@ -137,6 +136,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testCursorIndexed() throws Exception
     {
@@ -368,6 +368,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testCursorNotIndexed() throws Exception
     {
@@ -525,6 +526,7 @@
     // -----------------------------------------------------------------------
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testEvaluatorIndexed() throws Exception
     {
@@ -570,6 +572,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testEvaluatorWithDescendantValue() throws Exception
     {
@@ -596,6 +599,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testEvaluatorWithoutDescendants() throws Exception
     {
@@ -614,6 +618,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testEvaluatorNotIndexed() throws Exception
     {
@@ -660,6 +665,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test ( expected = IllegalStateException.class )
     public void testEvaluatorAttributeNoMatchingRule() throws Exception
     {
@@ -682,6 +688,7 @@
     }
 
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testEvaluatorAttributeOrderingMatchingRule() throws Exception
     {

Modified: directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=762538&r1=762537&r2=762538&view=diff
==============================================================================
--- directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
(original)
+++ directory/apacheds/branches/ldif-partition/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Mon Apr  6 22:25:12 2009
@@ -22,7 +22,6 @@
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
 import org.apache.directory.server.xdbm.tools.StoreUtils;
 import org.apache.directory.server.schema.registries.*;
@@ -63,7 +62,7 @@
 
 
     File wkdir;
-    Store<ServerEntry> store;
+    JdbmStore<ServerEntry> store;
     Registries registries = null;
     AttributeTypeRegistry attributeRegistry;
 
@@ -89,6 +88,7 @@
 
 
     @Before
+    @SuppressWarnings("unchecked")
     public void createStore() throws Exception
     {
         destryStore();
@@ -134,6 +134,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testCursorIndexed() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.POSTALCODE_AT_OID );
@@ -385,6 +386,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testCursorNotIndexed() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.POSTOFFICEBOX_AT_OID
);
@@ -562,6 +564,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testEvaluatorIndexed() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.POSTALCODE_AT_OID );
@@ -608,6 +611,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testEvaluatorWithDescendantValue() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.STREET_AT_OID );
@@ -635,6 +639,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testEvaluatorWithoutDescendants() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.C_POSTALCODE_AT_OID
);
@@ -653,6 +658,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testEvaluatorNotIndexed() throws Exception
     {
         AttributeType at = attributeRegistry.lookup( SchemaConstants.POSTOFFICEBOX_AT_OID
);
@@ -699,6 +705,7 @@
 
 
     @Test ( expected = IllegalStateException.class )
+    @SuppressWarnings("unchecked")
     public void testEvaluatorAttributeNoMatchingRule() throws Exception
     {
         AttributeType at = new NoMatchingRuleAttributeType();
@@ -712,6 +719,7 @@
 
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testEvaluatorAttributeOrderingMatchingRule() throws Exception
     {
         AttributeType at = new OrderingOnlyMatchingRuleAttributeType();



Mime
View raw message