ivankelly commented on a change in pull request #1580: (@bug W-5100764@) Write
Ledger Handle listens for metadata changes
URL: https://github.com/apache/bookkeeper/pull/1580#discussion_r207494923
##########
File path:
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieWriteLedgerTest.java
##########
@@ -164,6 +205,85 @@ public void
testWithMultipleBookieFailuresInLastEnsemble() throws Exception {
lh.close();
}
+ /**
+ * Verify the write ledger handle can receive and process replication
worker
+ * ensemble changes to facilitate reads on the write ledger handle.
+ */
+ @Test
+ public void testWriteAndReadOnWriteLedgerHandleWithReplication() throws
Exception {
+ // Create a ledger
+ lh = bkc.createLedger(3, 3, 2, digestType, ledgerPassword);
+ // write 10 entries
+ int numEntriesToWrite = 10;
+ int i;
+
+ for (i = 0; i < numEntriesToWrite; i++) {
+ ByteBuffer entry = ByteBuffer.allocate(4);
+ entry.putInt(rng.nextInt(maxInt));
+ entry.position(0);
+ lh.addEntry(entry.array());
+ }
+
+ // Shutdown a bookie in the last ensemble and continue writing
+ ArrayList<BookieSocketAddress> ensemble1, ensemble2, ensemble1n;
Review comment:
ArrayList -> List // I changed this a couple of days ago
----------------------------------------------------------------
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