directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1221827 - /directory/apacheds/branches/apacheds-txns/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/search/ClientSearchRequestTest.java
Date Wed, 21 Dec 2011 18:06:10 GMT
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;
+        }
     }
 }



Mime
View raw message