directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r687164 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
Date Tue, 19 Aug 2008 21:37:31 GMT
Author: elecharny
Date: Tue Aug 19 14:37:30 2008
New Revision: 687164

URL: http://svn.apache.org/viewvc?rev=687164&view=rev
Log:
Fixed a failing test

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java?rev=687164&r1=687163&r2=687164&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
Tue Aug 19 14:37:30 2008
@@ -352,21 +352,15 @@
         // Inject the new attribute
         ctx.modifyAttributes( RDN, DirContext.ADD_ATTRIBUTE, attrs );
 
-        // Now try to remove a bad value
-        try
-        {
-            Attribute attr2 = new AttributeImpl( "telephoneNumber", "7890" );
-            Attributes attrs2 = new AttributesImpl();
-            attrs2.put( attr2 );
-        	
-            ctx.modifyAttributes( RDN, DirContext.REMOVE_ATTRIBUTE, attrs2 );
-            fail( "Deletion of attribute, which is not present in the entry, should fail."
);
-        }
-        catch ( NoSuchAttributeException e )
-        {
-        	assertTrue( true );
-            // expected behaviour
-        }
+        // Now try to remove a value which is not present
+        Attribute attr2 = new AttributeImpl( "telephoneNumber", "7890" );
+        Attributes attrs2 = new AttributesImpl();
+        attrs2.put( attr2 );
+    	
+        ctx.modifyAttributes( RDN, DirContext.REMOVE_ATTRIBUTE, attrs2 );
+        
+        // We shopuld not get an exception
+        assertTrue( true );
     }
 
 



Mime
View raw message