This is an automated email from the ASF dual-hosted git repository.
shoothzj pushed a commit to branch branch-4.17
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.17 by this push:
new cc6614b432 Enhance the SimpleTestCommand test, make it cover more
case. (#4387)
cc6614b432 is described below
commit cc6614b432ac91a659078c33b804cdf27e33c96f
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);
}
}