reddycharan commented on a change in pull request #1233: Reduce running time
for testLedgerCreateAdvWithLedgerIdInLoop
URL: https://github.com/apache/bookkeeper/pull/1233#discussion_r172752790
##########
File path:
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieWriteLedgerTest.java
##########
@@ -1191,6 +1209,17 @@ private void readEntries(LedgerHandle lh, List<byte[]>
entries) throws Interrupt
}
}
+ private void readEntries(ReadHandle reader, List<Integer> entries) throws
Exception {
+ AtomicInteger index = new AtomicInteger(0);
+ try (LedgerEntries readEntries = reader.read(0, numEntriesToWrite -
1).join()) {
+ readEntries.forEach(e -> {
+ int origEntry = entries.get(index.getAndIncrement());
+ int readEntry = e.getEntryBuffer().readInt();
+ assertEquals(origEntry, readEntry);
Review comment:
nit: probably adding ledgerid and entryid to the assert message would be
helpful in diagnosing in the case of failure
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services