sijie commented on a change in pull request #1042: ISSUE #1041: Adding new
testcases
URL: https://github.com/apache/bookkeeper/pull/1042#discussion_r163145972
##########
File path:
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieWriteLedgerTest.java
##########
@@ -392,6 +477,79 @@ public void testLedgerCreateAdvWithLedgerIdInLoop()
throws Exception {
}
}
+ /**
+ * In a loop create/write/read/delete the ledger with ledgerId through the
+ * functionality of Advanced Ledger which accepts ledgerId as input.
+ * In this testcase (other testcases don't cover these conditions, hence
new
+ * testcase is added), we create entries which are greater than
+ * SKIP_LIST_MAX_ALLOC_ENTRY size and tried to addEntries so that the total
+ * length of data written in this testcase is much greater than
+ * SKIP_LIST_SIZE_LIMIT, so that entries will be flushed from EntryMemTable
+ * to persistent storage
+ *
+ * @throws Exception
+ */
+ @Test(timeout = 180000)
+ public void testLedgerCreateAdvWithLedgerIdInLoop2() throws Exception {
+
+ assertTrue("Here we are expecting Bookies are configured to use
SortedLedgerStorage",
+ baseConf.getSortedLedgerStorageEnabled());
+
+ long ledgerId;
+ int ledgerCount = 10;
+
+ List<List<byte[]>> entryList = new ArrayList<List<byte[]>>();
+ LedgerHandle[] lhArray = new LedgerHandle[ledgerCount];
+ long skipListSizeLimit = baseConf.getSkipListSizeLimit();
Review comment:
this is not a good unit test. can you set the skip list size limit to a
smaller value? you shouldn't use the default value of testing purpose.
----------------------------------------------------------------
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