directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r579393 - /directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java
Date Tue, 25 Sep 2007 21:35:24 GMT
Author: elecharny
Date: Tue Sep 25 14:35:23 2007
New Revision: 579393

URL: http://svn.apache.org/viewvc?rev=579393&view=rev
Log:
Fixed the failing test, and added a comment about the root problem. Many thanks to JNDI for
this bug :)

Modified:
    directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java

Modified: directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java?rev=579393&r1=579392&r2=579393&view=diff
==============================================================================
--- directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java
(original)
+++ directory/apacheds/trunk/server-unit/src/test/java/org/apache/directory/server/FastDelITest.java
Tue Sep 25 14:35:23 2007
@@ -28,6 +28,7 @@
 import javax.naming.directory.SearchResult;
 
 import org.apache.directory.server.unit.AbstractServerFastTest;
+import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.junit.Before;
 import org.junit.Test;
 import static org.junit.Assert.fail;
@@ -94,17 +95,25 @@
     
     /**
      * Try to delete an inexistant name.
+     * 
+     * WARNING !!! This test is valid ONLY because we have a double inexistant
+     * RDN in the context. doing the same thing with a single RDN will miserabilly 
+     * fail because of a gross misunderstanding of the RFC by SUN : JNDI is 
+     * considering that the matchedDN may be used to modify the resultCode,
+     * which is really a bad idea...
+     * 
+     * A bug report has been filled : ID 1074903
      */
     @Test public void testDeleteInvalidName() throws NamingException
     {
         try
         {
-            ctx.destroySubcontext( "cn=This does not exist" );
-            //fail("deletion should fail");
+            ctx.destroySubcontext( "cn=This does not exist, cn=at all" );
+            fail("deletion should fail");
         } 
         catch ( Exception e) 
         {
-            assertTrue( e instanceof InvalidNameException );
+            assertTrue( e instanceof NameNotFoundException );
         }
     }
 



Mime
View raw message