* @throws RepositoryException if an error occurs while iterating over the
* result nodes.
*/
protected void checkResult(QueryResult result, int hits)
throws RepositoryException {
RowIterator itr = result.getRows();
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);
}