assertEquals("Hit "+i+" has doc id "+hits.id(i)+" instead of "+i,i,hits.id(i));
if ((intermittent && (i==50 || i==250 || i==950)) || //100-yes, 200-no, 400-yes, 800-no, 1600-yes
(!intermittent && (k<2 || (i>0 && i%k==0)))) {
Document doc = hits.doc(id);
log("Deleting hit "+i+" - doc "+doc+" with id "+id);
reader.deleteDocument(id);
}
if (intermittent) {
// check internal behavior of Hits (go 50 ahead of getMoreDocs points because the deletions cause to use more of the available hits)
if (i==150 || i==450 || i==1650) {
assertTrue("Hit "+i+": hits should have checked for deletions in last call to getMoreDocs()",hits.debugCheckedForDeletions);