directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r602007 - in /directory/apacheds/branches/bigbang: core-integ/src/test/java/org/apache/directory/server/core/schema/ core/src/main/java/org/apache/directory/server/core/schema/ schema-registries/src/main/java/org/apache/directory/server/sch...
Date Fri, 07 Dec 2007 07:00:37 GMT
Author: akarasulu
Date: Thu Dec  6 23:00:33 2007
New Revision: 602007

URL: http://svn.apache.org/viewvc?rev=602007&view=rev
Log:
fixed some schema handling bugs: rootDSE issue with optimization and some issues with registries

Modified:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
    directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -55,7 +55,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaAttributeTypeHandlerIT
 {
     private static final String DESCRIPTION0 = "A test attributeType";

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -25,11 +25,10 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import org.apache.directory.server.schema.registries.ComparatorRegistry;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -62,7 +61,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaComparatorHandlerIT
 {
     private static final String OID = "1.3.6.1.4.1.18060.0.4.0.1.100000";
@@ -95,7 +93,13 @@
     {
         return service.getRegistries().getMatchingRuleRegistry();
     }
-    
+
+
+    private static OidRegistry getOidRegistry()
+    {
+        return service.getRegistries().getOidRegistry();
+    }
+
 
     // ----------------------------------------------------------------------
     // Test all core methods with normal operational pathways
@@ -332,6 +336,7 @@
         assertTrue( "comparator should still be in the registry after delete failure", 
             getComparatorRegistry().hasComparator( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
     
     
@@ -360,6 +365,7 @@
         assertTrue( "comparator should still be in the registry after move failure", 
             getComparatorRegistry().hasComparator( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 
@@ -388,6 +394,7 @@
         assertTrue( "comparator should still be in the registry after move failure", 
             getComparatorRegistry().hasComparator( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
     
@@ -415,6 +422,7 @@
         assertTrue( "comparator should still be in the registry after rename failure", 
             getComparatorRegistry().hasComparator( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -53,7 +53,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaMatchingRuleHandlerIT
 {
     private static final String DESCRIPTION0 = "A test matchingRule";

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -23,11 +23,10 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
 import org.apache.directory.server.schema.registries.NormalizerRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
 import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -58,7 +57,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaNormalizerHandlerIT
 {
     private static final String OID = "1.3.6.1.4.1.18060.0.4.0.1.100000";
@@ -93,6 +91,12 @@
     }
 
 
+    private static OidRegistry getOidRegistry()
+    {
+        return service.getRegistries().getOidRegistry();
+    }
+
+
     // ----------------------------------------------------------------------
     // Test all core methods with normal operational pathways
     // ----------------------------------------------------------------------
@@ -330,6 +334,7 @@
         assertTrue( "normalizer should still be in the registry after delete failure", 
             getNormalizerRegistry().hasNormalizer( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
     
     
@@ -358,6 +363,7 @@
         assertTrue( "normalizer should still be in the registry after move failure", 
             getNormalizerRegistry().hasNormalizer( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 
@@ -386,6 +392,7 @@
         assertTrue( "normalizer should still be in the registry after move failure", 
             getNormalizerRegistry().hasNormalizer( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
     
@@ -413,6 +420,7 @@
         assertTrue( "normalizer should still be in the registry after rename failure", 
             getNormalizerRegistry().hasNormalizer( OID ) );
         getMatchingRuleRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -54,7 +54,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaObjectClassHandlerIT
 {
     private static final String NAME = "testObjectClass";

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -23,8 +23,6 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import org.apache.directory.server.schema.bootstrap.Schema;
 import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
@@ -34,7 +32,9 @@
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import static org.junit.Assert.*;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -54,7 +54,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaSchemaHandlerIT
 {
     /** the schema to use for this test: one that is not loaded by default */
@@ -80,6 +79,21 @@
     }
 
 
+    @Before
+    public void checkSambaSchema() throws NamingException
+    {
+        LdapContext schemaRoot = getSchemaContext( service );
+
+        // check that there is a samba schema installed and that is is disabled
+        Attributes attributes = schemaRoot.getAttributes( "cn=samba" );
+        assertNotNull( attributes );
+        assertTrue( attributes.get( MetaSchemaConstants.M_DISABLED_AT ).contains( "TRUE"
) );
+        attributes = schemaRoot.getAttributes( "ou=attributeTypes,cn=samba" );
+        assertNotNull( attributes );
+        assertTrue( attributes.get( SchemaConstants.OU_AT ).contains( "attributetypes" )
);
+    }
+
+
     // -----------------------------------------------------------------------
     // Schema Add Tests
     // -----------------------------------------------------------------------
@@ -502,6 +516,14 @@
         schemaRoot.rename( "cn=samba", "cn=foo" );
         assertNotNull( schemaRoot.lookup( "cn=foo" ) );
 
+        // check that there is a samba schema installed and that is is disabled
+        Attributes attributes = schemaRoot.getAttributes( "cn=foo" );
+        assertNotNull( attributes );
+        assertTrue( attributes.get( MetaSchemaConstants.M_DISABLED_AT ).contains( "TRUE"
) );
+        attributes = schemaRoot.getAttributes( "ou=attributeTypes,cn=foo" );
+        assertNotNull( attributes );
+        assertTrue( attributes.get( SchemaConstants.OU_AT ).contains( "attributetypes" )
);
+
         //noinspection EmptyCatchBlock
         try
         {
@@ -560,6 +582,7 @@
     public void testSchemaRenameEnabledSchema() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( service );
+
         enableSchema( "samba" );
         assertTrue( getAttributeTypeRegistry().hasAttributeType( "sambaNTPassword" ) );
         assertEquals( "samba", getAttributeTypeRegistry().getSchemaName( "sambaNTPassword"
) );

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -23,9 +23,8 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.SyntaxCheckerRegistry;
 import org.apache.directory.server.schema.registries.SyntaxRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -59,7 +58,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaSyntaxCheckerHandlerIT
 {
     private static final String OID = "1.3.6.1.4.1.18060.0.4.0.0.100000";
@@ -81,6 +79,12 @@
     }
 
 
+    private static OidRegistry getOidRegistry()
+    {
+        return service.getRegistries().getOidRegistry();
+    }
+
+
     /**
      * Gets relative DN to ou=schema.
      *
@@ -331,6 +335,7 @@
         assertTrue( "syntaxChecker should still be in the registry after delete failure",

             getSyntaxCheckerRegistry().hasSyntaxChecker( OID ) );
         getSyntaxRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
     
     
@@ -359,6 +364,7 @@
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
             getSyntaxCheckerRegistry().hasSyntaxChecker( OID ) );
         getSyntaxRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 
@@ -387,6 +393,7 @@
         assertTrue( "syntaxChecker should still be in the registry after move failure", 
             getSyntaxCheckerRegistry().hasSyntaxChecker( OID ) );
         getSyntaxRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
     
@@ -414,6 +421,7 @@
         assertTrue( "syntaxChecker should still be in the registry after rename failure",

             getSyntaxCheckerRegistry().hasSyntaxChecker( OID ) );
         getSyntaxRegistry().unregister( OID );
+        getOidRegistry().unregister( OID );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
Thu Dec  6 23:00:33 2007
@@ -23,11 +23,10 @@
 import org.apache.directory.server.constants.MetaSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import org.apache.directory.server.schema.registries.MatchingRuleRegistry;
+import org.apache.directory.server.schema.registries.OidRegistry;
 import org.apache.directory.server.schema.registries.SyntaxRegistry;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
@@ -40,8 +39,8 @@
 import org.apache.directory.shared.ldap.schema.Syntax;
 import org.apache.directory.shared.ldap.schema.syntax.AcceptAllSyntaxChecker;
 import static org.junit.Assert.*;
-import org.junit.runner.RunWith;
 import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -58,7 +57,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class MetaSyntaxHandlerIT
 {
     private static final String DESCRIPTION0 = "A test normalizer";

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
Thu Dec  6 23:00:33 2007
@@ -40,7 +40,6 @@
 
 
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class ObjectClassCreateIT
 {
     private String testOID = "1.3.6.1.4.1.18060.0.4.0.3.1.555555.5555.5555555";

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaISuite.java
Thu Dec  6 23:00:33 2007
@@ -35,7 +35,6 @@
  * @version $Rev$, $Date$
  */
 @RunWith ( CiSuite.class )
-@Ignore( "several problems present with schema integration tests which i will fix later"
)
 @Suite.SuiteClasses ( {
         MetaAttributeTypeHandlerIT.class,
         MetaComparatorHandlerIT.class,
@@ -50,7 +49,6 @@
         SubschemaSubentryIT.class,
         SchemaServiceIT.class
         } )
-@Mode ( SetupMode.PRISTINE )
 public class SchemaISuite
 {
 }

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
Thu Dec  6 23:00:33 2007
@@ -22,18 +22,17 @@
 
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
-import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.syntax.AttributeTypeDescription;
 import org.apache.directory.shared.ldap.schema.syntax.parser.AttributeTypeDescriptionSchemaParser;
-import org.junit.Test;
 import static org.junit.Assert.*;
+import org.junit.Before;
+import org.junit.Test;
 import org.junit.runner.RunWith;
 
 import javax.naming.NamingEnumeration;
@@ -51,7 +50,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class SchemaPersistenceIT
 {
     private static final String SUBSCHEMA_SUBENTRY = "subschemaSubentry";
@@ -78,9 +76,6 @@
         // test successful add with everything
         // -------------------------------------------------------------------
 
-        modify( DirContext.REMOVE_ATTRIBUTE, descriptions, "attributeTypes" );
-        
-        descriptions.clear();
         descriptions.add( "( 1.3.6.1.4.1.18060.0.4.1.2.10000 NAME 'type0' " +
                 "OBSOLETE SUP 2.5.4.41 " +
                 "EQUALITY caseExactIA5Match " +

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
Thu Dec  6 23:00:33 2007
@@ -58,7 +58,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class SchemaServiceIT
 {
     public static DirectoryService service;

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
Thu Dec  6 23:00:33 2007
@@ -64,7 +64,6 @@
  * @version $Rev$
  */
 @RunWith ( CiRunner.class )
-@Mode ( SetupMode.PRISTINE )
 public class SubschemaSubentryIT 
 {
     private static final String GLOBAL_SUBSCHEMA_DN = "cn=schema";

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/AbstractSchemaChangeHandler.java
Thu Dec  6 23:00:33 2007
@@ -66,32 +66,32 @@
     protected void checkOidIsUnique( Attributes entry ) throws NamingException
     {
         String oid = getOid( entry );
-        
+
         if ( targetRegistries.getOidRegistry().hasOid( oid ) )
         {
-            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.", 
+            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.",
                 ResultCodeEnum.OTHER );
         }
     }
 
-    
+
     protected void checkOidIsUnique( SchemaObject schemaObject ) throws NamingException
     {
         String oid = schemaObject.getOid();
-        
+
         if ( targetRegistries.getOidRegistry().hasOid( oid ) )
         {
-            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.", 
+            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.",
                 ResultCodeEnum.OTHER );
         }
     }
-    
-    
+
+
     protected void checkOidIsUnique( String oid ) throws NamingException
     {
         if ( targetRegistries.getOidRegistry().hasOid( oid ) )
         {
-            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.", 
+            throw new LdapNamingException( "Oid " + oid + " for new schema entity is not
unique.",
                 ResultCodeEnum.OTHER );
         }
     }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Thu Dec  6 23:00:33 2007
@@ -424,26 +424,37 @@
 
             Attributes mods = schemaPartition.lookup( new LookupOperationContext( schemaModificationAttributesDN
) );
             Attribute modifyTimeDisk = mods.get( SchemaConstants.MODIFY_TIMESTAMP_AT );
-            Attribute modifyTimeMemory = schemaSubentry.get( SchemaConstants.MODIFY_TIMESTAMP_AT
);
 
-            if ( modifyTimeDisk == null && modifyTimeMemory == null )
-            {
-                // do nothing!
-            }
-            else if ( modifyTimeDisk != null && modifyTimeMemory != null )
-            {
-                Date disk = DateUtils.getDate( ( String ) modifyTimeDisk.get() );
-                Date mem = DateUtils.getDate( ( String ) modifyTimeMemory.get() );
-                if ( disk.after( mem ) )
-                {
-                    generateSchemaSubentry( mods );
-                }
-            }
-            else
-            {
-                generateSchemaSubentry( mods );
-            }
+            Attribute modifyTimeMemory = null;
+
+            // @todo enable this optimization at some point but for now it
+            // is causing some problems so I will just turn it off
 
+//            if ( schemaSubentry != null )
+//            {
+//                modifyTimeMemory = schemaSubentry.get( SchemaConstants.MODIFY_TIMESTAMP_AT
);
+//                if ( modifyTimeDisk == null && modifyTimeMemory == null )
+//                {
+//                    // do nothing!
+//                }
+//                else if ( modifyTimeDisk != null && modifyTimeMemory != null )
+//                {
+//                    Date disk = DateUtils.getDate( ( String ) modifyTimeDisk.get() );
+//                    Date mem = DateUtils.getDate( ( String ) modifyTimeMemory.get() );
+//                    if ( disk.after( mem ) )
+//                    {
+//                        generateSchemaSubentry( mods );
+//                    }
+//                }
+//                else
+//                {
+//                    generateSchemaSubentry( mods );
+//                }
+//            }
+//            else
+//            {
+                generateSchemaSubentry( mods );
+//            }
 
             // ---------------------------------------------------------------
             // Prep Work: Transform the attributes to their OID counterpart

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultAttributeTypeRegistry.java
Thu Dec  6 23:00:33 2007
@@ -345,6 +345,5 @@
 
         byOid.remove( numericOid );
         oidToDescendantSet.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitContentRuleRegistry.java
Thu Dec  6 23:00:33 2007
@@ -149,6 +149,5 @@
         }
 
         byOid.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultDitStructureRuleRegistry.java
Thu Dec  6 23:00:33 2007
@@ -187,7 +187,6 @@
 
         DITStructureRule dsr = byOid.remove( numericOid );
         byRuleId.remove( dsr.getRuleId() );
-        oidRegistry.unregister( numericOid );
     }
 
 

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultMatchingRuleRegistry.java
Thu Dec  6 23:00:33 2007
@@ -166,6 +166,5 @@
         }
 
         byOid.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultNameFormRegistry.java
Thu Dec  6 23:00:33 2007
@@ -149,6 +149,5 @@
         }
 
         byOid.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultObjectClassRegistry.java
Thu Dec  6 23:00:33 2007
@@ -163,6 +163,5 @@
         }
 
         byOid.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }

Modified: directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java?rev=602007&r1=602006&r2=602007&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
(original)
+++ directory/apacheds/branches/bigbang/schema-registries/src/main/java/org/apache/directory/server/schema/registries/DefaultSyntaxRegistry.java
Thu Dec  6 23:00:33 2007
@@ -170,6 +170,5 @@
         }
 
         byOid.remove( numericOid );
-        oidRegistry.unregister( numericOid );
     }
 }



Mime
View raw message