ivankelly commented on a change in pull request #1298: newOpenLedgerOp and 
ReadHandle implementation for MockBookKeeper
URL: https://github.com/apache/bookkeeper/pull/1298#discussion_r179088671
 
 

 ##########
 File path: 
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/MockBookKeeper.java
 ##########
 @@ -210,6 +214,43 @@ public void close() throws InterruptedException, 
BKException {
         shutdown();
     }
 
+    @Override
+    public OpenBuilder newOpenLedgerOp() {
+        return new OpenBuilderBase() {
+            @Override
+            public CompletableFuture<ReadHandle> execute() {
+                CompletableFuture<ReadHandle> promise = new 
CompletableFuture<ReadHandle>();
+
+                if (!validate()) {
+                    promise.completeExceptionally(new 
BKException.BKNoSuchLedgerExistsException());
 
 Review comment:
   done.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to