sijie commented on a change in pull request #1042: ISSUE #1041: Adding new 
testcases
URL: https://github.com/apache/bookkeeper/pull/1042#discussion_r163355447
 
 

 ##########
 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:
   you have a few options here:
   
   1) what is the side effects of setting smaller skip list size limit? if 
there is not side effects, you can set the setting in the constructor, and the 
same setting will be applied to all the test cases. Ideally all the other tests 
should run okay with any skip list size limit.
   
   2) you can stop the cluster, update the configuration and start the cluster 
in this test case.
   
   3) you can move this test case to a separate test suite, which is configured 
with smaller skip list limit size.
   
   thoughts?

----------------------------------------------------------------
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

Reply via email to