You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2006/01/30 03:30:00 UTC

svn commit: r373414 - in /directory/trunks/apacheds: core-unit/src/main/java/org/apache/ldap/server/unit/ core-unit/src/test/java/org/apache/ldap/server/jndi/ core/src/main/java/org/apache/ldap/server/partition/

Author: akarasulu
Date: Sun Jan 29 18:29:55 2006
New Revision: 373414

URL: http://svn.apache.org/viewcvs?rev=373414&view=rev
Log:
ignore null chain with abandon request competition while shutting down

Modified:
    directory/trunks/apacheds/core-unit/src/main/java/org/apache/ldap/server/unit/AbstractTestCase.java
    directory/trunks/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ExtensibleObjectTest.java
    directory/trunks/apacheds/core/src/main/java/org/apache/ldap/server/partition/DirectoryPartitionNexusProxy.java

Modified: directory/trunks/apacheds/core-unit/src/main/java/org/apache/ldap/server/unit/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/main/java/org/apache/ldap/server/unit/AbstractTestCase.java?rev=373414&r1=373413&r2=373414&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/main/java/org/apache/ldap/server/unit/AbstractTestCase.java (original)
+++ directory/trunks/apacheds/core-unit/src/main/java/org/apache/ldap/server/unit/AbstractTestCase.java Sun Jan 29 18:29:55 2006
@@ -208,6 +208,7 @@
         // -------------------------------------------------------------------
 
         configuration.setTestEntries( testEntries );
+        configuration.setShutdownHookEnabled( false );
         doDelete( configuration.getWorkingDirectory() );
         setSysRoot( username, password, configuration );
     }

Modified: directory/trunks/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ExtensibleObjectTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ExtensibleObjectTest.java?rev=373414&r1=373413&r2=373414&view=diff
==============================================================================
--- directory/trunks/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ExtensibleObjectTest.java (original)
+++ directory/trunks/apacheds/core-unit/src/test/java/org/apache/ldap/server/jndi/ExtensibleObjectTest.java Sun Jan 29 18:29:55 2006
@@ -84,7 +84,15 @@
         attribute.add( "organizationalUnit" );
         attributes.put( attribute );
         attributes.put( "ou", "testing00" );
-        attributes.put( "freeform", "testing" );
+        
+        // WARNING: extensible objects cannot accept any arbitrary 
+        // attribute.  The attribute must be defined by the schema
+        // at a bare minimum or the addition will be rejected
+        
+        // here's an attribute that is not on the MAY or MUST list for 
+        // an organizationalUnit - it's our test for extensible objects
+        attributes.put( "employeeType", "testing" );
+        
         DirContext ctx = sysRoot.createSubcontext( "ou=testing00", attributes );
         assertNotNull( ctx );
 
@@ -99,7 +107,7 @@
         assertTrue( attribute.contains( "top" ) );
         assertTrue( attribute.contains( "extensibleObject" ) );
         assertTrue( attribute.contains( "organizationalUnit" ) );
-        attribute = attributes.get( "freeform" );
+        attribute = attributes.get( "employeeType" );
         assertTrue( attribute.contains( "testing" ) );
     }
 }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/ldap/server/partition/DirectoryPartitionNexusProxy.java
URL: http://svn.apache.org/viewcvs/directory/trunks/apacheds/core/src/main/java/org/apache/ldap/server/partition/DirectoryPartitionNexusProxy.java?rev=373414&r1=373413&r2=373414&view=diff
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/ldap/server/partition/DirectoryPartitionNexusProxy.java (original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/ldap/server/partition/DirectoryPartitionNexusProxy.java Sun Jan 29 18:29:55 2006
@@ -713,6 +713,10 @@
     public void removeNamingListener( EventContext ctx, NamingListener namingListener ) throws NamingException
     {
         InterceptorChain chain = this.configuration.getInterceptorChain();
+        if ( chain == null )
+        {
+            return;
+        }
         EventService interceptor = ( EventService ) chain.get( "eventService" );
         interceptor.removeNamingListener( ctx, namingListener );
     }