directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r772109 - in /directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api: LdapConnectionTest.java SearchRequestTest.java
Date Wed, 06 May 2009 09:30:53 GMT
Author: elecharny
Date: Wed May  6 09:30:52 2009
New Revision: 772109

URL: http://svn.apache.org/viewvc?rev=772109&view=rev
Log:
Fixed the tests : cursor were not used correctly

Modified:
    directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
    directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/SearchRequestTest.java

Modified: directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java?rev=772109&r1=772108&r2=772109&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
(original)
+++ directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionTest.java
Wed May  6 09:30:52 2009
@@ -172,11 +172,15 @@
 
             SearchResponse response = null;
             int count = 0;
-            
-            while ( (response = cursor.get() ) != null )
+         
+            while ( cursor.available() )
             {
+                response = cursor.get();
+                
                 assertNotNull( response );
                 count++;
+                
+                cursor.next();
             } 
             
             assertEquals( 1, count );

Modified: directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/SearchRequestTest.java?rev=772109&r1=772108&r2=772109&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/SearchRequestTest.java
(original)
+++ directory/apacheds/branches/apacheds-replication/ldap-api-test/src/test/java/org/apache/directory/shared/client/api/SearchRequestTest.java
Wed May  6 09:30:52 2009
@@ -129,7 +129,7 @@
             SearchResponse response = null;
             int count = 0;
 
-            while ( cursor.next() )
+            while ( cursor.available() )
             {
                 response = cursor.get();
                 assertNotNull( response );
@@ -142,6 +142,8 @@
                 assertNotNull( entry );
                 assertEquals( "uid=admin,ou=system", entry.getDn().toString() );
                 count++;
+                
+                cursor.next();
             } 
             
             assertEquals( 1, count );



Mime
View raw message