mattisonchao commented on code in PR #17712:
URL: https://github.com/apache/pulsar/pull/17712#discussion_r1015029118


##########
managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/ManagedCursorPropertiesTest.java:
##########
@@ -232,6 +235,31 @@ void testUpdateCursorProperties() throws Exception {
         ledger.close();
 
         factory2.shutdown();
+
+        // Create a new factory to force a managed ledger close and recovery
+        ManagedLedgerFactory factory3 = new 
ManagedLedgerFactoryImpl(metadataStore, bkc);
+        // Reopen the managed ledger
+        ledger = factory3.open("testUpdateCursorProperties", new 
ManagedLedgerConfig());
+        c1 = ledger.openCursor("c1");
+
+        c1.putCursorProperty(CURSOR_INTERNAL_PROPERTY_PREFIX + "test", 
"test").get();
+        c1.putCursorProperty("custom4", "custom4").get();

Review Comment:
   If we call the `CompletableFuture#get` method, it's better to give the test 
a timeout.



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