for (int expected = firstTxnId; expected <= lastTxnId; expected++) {
if (inProgress) { // otherwise we cannot call refresh
stream.refresh(position, expected - 1);
}
FSEditLogOp op = stream.readOp();
position = stream.getPosition();
while (op == null) {
assertTrue("Expected to find txid " + expected + ", "
+ "but no more streams available to read from", iter.hasNext());