for ( int i = 0; i < fetchCount; i++ )
{
// Stop fetching if we are past the total # of available hits.
- if ( offset + i > results.getTotalHits() )
+ if ( offset + i >= results.getHits().size() )
{
break;
}
}
}
}
- paginated.setTotalHits( paginated.getHitsMap().size() );
+ paginated.setTotalHits( results.getTotalHits() );
return paginated;
}
archivaConfigControl.verify();
assertNotNull( results );
- assertEquals( 1, results.getTotalHits() );
+ assertEquals( 1, results.getHits().size() );
+ assertEquals( 2, results.getTotalHits() );
archivaConfigControl.reset();
archivaConfigControl.verify();
assertNotNull( results );
- assertEquals( 1, results.getTotalHits() );
+ assertEquals( 1, results.getHits().size() );
+ assertEquals( 2, results.getTotalHits() );
}
public void testArtifactFoundInMultipleRepositories()