You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/12/21 19:06:10 UTC

svn commit: r1221827 - /directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java

Author: elecharny
Date: Wed Dec 21 18:06:09 2011
New Revision: 1221827

URL: http://svn.apache.org/viewvc?rev=1221827&view=rev
Log:
One more missing cursor close

Modified:
    directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java

Modified: directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java?rev=1221827&r1=1221826&r2=1221827&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java (original)
+++ directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java Wed Dec 21 18:06:09 2011
@@ -23,6 +23,7 @@ package org.apache.directory.shared.clie
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 import java.util.concurrent.TimeUnit;
 
@@ -277,6 +278,18 @@ public class ClientSearchRequestTest ext
     @Test(expected = LdapException.class)
     public void testSearchUTF8() throws Exception
     {
-        connection.search( "ou=system", "(sn=Emmanuel L\u00e9charny)", SearchScope.ONELEVEL, "*", "+" );
+        EntryCursor cursor = null;
+
+        try
+        {
+            cursor = connection.search( "ou=system", "(sn=Emmanuel L\u00e9charny)", SearchScope.ONELEVEL, "*", "+" );
+            fail();
+        }
+        catch ( Exception e )
+        {
+            cursor.close( e );
+
+            throw e;
+        }
     }
 }