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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 92abf6ea173 Add more test cases for FirebirdPacketPayloadTest (#38162)
92abf6ea173 is described below

commit 92abf6ea173d8db29adfdb0ab28686c9d7c20274
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Feb 23 19:42:48 2026 +0800

    Add more test cases for FirebirdPacketPayloadTest (#38162)
---
 .../protocol/firebird/payload/FirebirdPacketPayloadTest.java   | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/database/protocol/dialect/firebird/src/test/java/org/apache/shardingsphere/database/protocol/firebird/payload/FirebirdPacketPayloadTest.java
 
b/database/protocol/dialect/firebird/src/test/java/org/apache/shardingsphere/database/protocol/firebird/payload/FirebirdPacketPayloadTest.java
index 610df18a629..5aa7ea47cf8 100644
--- 
a/database/protocol/dialect/firebird/src/test/java/org/apache/shardingsphere/database/protocol/firebird/payload/FirebirdPacketPayloadTest.java
+++ 
b/database/protocol/dialect/firebird/src/test/java/org/apache/shardingsphere/database/protocol/firebird/payload/FirebirdPacketPayloadTest.java
@@ -122,10 +122,16 @@ class FirebirdPacketPayloadTest {
     }
     
     @Test
-    void assertReadBuffer() {
-        when(byteBuf.readInt()).thenReturn(4);
+    void assertReadBytes() {
         ByteBuf sliced = mock(ByteBuf.class);
         when(byteBuf.readSlice(4)).thenReturn(sliced);
+        assertThat(new FirebirdPacketPayload(byteBuf, 
StandardCharsets.UTF_8).readBytes(4), is(sliced));
+    }
+    
+    @Test
+    void assertReadBuffer() {
+        ByteBuf sliced = mock(ByteBuf.class);
+        when(byteBuf.readSlice(0)).thenReturn(sliced);
         assertThat(new FirebirdPacketPayload(byteBuf, 
StandardCharsets.UTF_8).readBuffer(), is(sliced));
     }
     

Reply via email to