horizonzy commented on code in PR #17056:
URL: https://github.com/apache/pulsar/pull/17056#discussion_r943673935


##########
managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/NonDurableCursorTest.java:
##########
@@ -737,6 +738,69 @@ public void testBacklogStatsWhenDroppingData() throws 
Exception {
         ledger.close();
     }
 
+    @Test
+    public void testInvalidateReadHandleWithSlowNonDurableCursor() throws 
Exception {
+        ManagedLedgerImpl ledger = (ManagedLedgerImpl) 
factory.open("testInvalidateReadHandleWithSlowNonDurableCursor",
+                new 
ManagedLedgerConfig().setMaxEntriesPerLedger(1).setRetentionTime(-1, 
TimeUnit.SECONDS)
+                        .setRetentionSizeInMB(-1));
+        ManagedCursor c1 = ledger.openCursor("c1");
+        ManagedCursor nonDurableCursor = 
ledger.newNonDurableCursor(PositionImpl.EARLIEST);

Review Comment:
   To mock the real situation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to