jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r518996 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
Date Fri, 16 Mar 2007 15:04:08 GMT
Author: mreutegg
Date: Fri Mar 16 08:04:08 2007
New Revision: 518996

URL: http://svn.apache.org/viewvc?view=rev&rev=518996
Log:
JCR-796: AbstractQueryTest does not handle unknown result size properly

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java?view=diff&rev=518996&r1=518995&r2=518996
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
Fri Mar 16 08:04:08 2007
@@ -150,6 +150,13 @@
         long count = itr.getSize();
         if (count == 0) {
             log.println(" NONE");
+        } else if (count == -1) {
+            // have to count in a loop
+            count = 0;
+            while (itr.hasNext()) {
+                itr.nextRow();
+                count++;
+            }
         }
         assertEquals("Wrong hit count.", hits, count);
     }



Mime
View raw message