This is an automated email from the ASF dual-hosted git repository.

shoothzj pushed a commit to branch branch-4.16
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.16 by this push:
     new b334d9f20d Enhance the SimpleTestCommand test, make it cover more 
case. (#4387)
b334d9f20d is described below

commit b334d9f20dc94c17d4f74354a03bc05cccc5992b
Author: Yan Zhao <[email protected]>
AuthorDate: Sat May 25 08:25:38 2024 +0800

    Enhance the SimpleTestCommand test, make it cover more case. (#4387)
    
    (cherry picked from commit 4d3c0e01127cf7b134fc0c76db90e2acf75a7678)
---
 .../tools/cli/commands/client/SimpleTestCommandTest.java          | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java
 
b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java
index 70ffa46f00..24a10a9ffe 100644
--- 
a/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java
+++ 
b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java
@@ -149,7 +149,13 @@ public class SimpleTestCommandTest extends 
ClientCommandTestBase {
         // verify appends
         verify(wh, times(10)).append(eq(data));
 
-        verify(rh, times(1)).read(anyLong(), anyLong());
+        // verify close write handle.
+        verify(wh, times(1)).close();
+        // verify close the read handle.
+        verify(rh, times(2)).close();
+        // verify read entry 0-9
+        verify(rh, times(1)).readUnconfirmed(0, 9);
+        verify(rh, times(1)).read(0, 9);
     }
 
 }

Reply via email to