directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1572100 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Date Wed, 26 Feb 2014 15:40:17 GMT
Author: kayyagari
Date: Wed Feb 26 15:40:17 2014
New Revision: 1572100

URL: http://svn.apache.org/r1572100
Log:
some more tests for DIRSERVER-1961

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java?rev=1572100&r1=1572099&r2=1572100&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchIT.java
Wed Feb 26 15:40:17 2014
@@ -2089,10 +2089,29 @@ public class SearchIT extends AbstractLd
     {
         LdapConnection conn = getAdminConnection( service );
 
-        EntryCursor cursor = conn.search( "ou=schema", "(objectClass=person)", SearchScope.OBJECT,
"*" );
+        EntryCursor cursor = conn.search( "ou=schema", "(|(objectClass=*)(cn=x))", SearchScope.OBJECT,
"*" );
+
+        assertTrue( cursor.next() );
+        cursor.close();
+
+        cursor = conn.search( "ou=schema", "(objectClass=person)", SearchScope.OBJECT, "*"
);
 
         assertFalse( cursor.next() );
+        cursor.close();
+
+        cursor = conn.search( "", "(objectClass=person)", SearchScope.ONELEVEL, "*" );
+
+        assertFalse( cursor.next() );
+        cursor.close();
+        
+        cursor = conn.search( "", "(objectClass=person)", SearchScope.SUBTREE, "*" );
+        int count = 0;
+        while( cursor.next() )
+        {
+            count++;
+        }
         
+        assertEquals(3, count);
         cursor.close();
     }
 }



Mime
View raw message