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 6cb4cfc241f Add more test cases on CDCChannelInboundHandlerTest 
(#37957)
6cb4cfc241f is described below

commit 6cb4cfc241f51389c1233aee6f2e2f179fa80a76
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Feb 4 16:48:37 2026 +0800

    Add more test cases on CDCChannelInboundHandlerTest (#37957)
    
    * Add PLANS.md for codex
    
    * Add more test cases on CDCChannelInboundHandlerTest
---
 .../proxy/frontend/netty/CDCChannelInboundHandlerTest.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git 
a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandlerTest.java
 
b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandlerTest.java
index 40264616092..8beb102716f 100644
--- 
a/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandlerTest.java
+++ 
b/proxy/frontend/core/src/test/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandlerTest.java
@@ -205,6 +205,18 @@ class CDCChannelInboundHandlerTest {
         assertFalse(channel.isOpen());
     }
     
+    @Test
+    void assertLoginRequestBodyWithoutBasicBody() {
+        
channel.writeInbound(CDCRequest.newBuilder().setType(Type.LOGIN).setRequestId("login-without-basic-body")
+                
.setLoginRequestBody(LoginRequestBody.newBuilder().setType(LoginRequestBody.LoginType.BASIC).build()).build());
+        CDCResponse greeting = channel.readOutbound();
+        assertTrue(greeting.hasServerGreetingResult());
+        CDCResponse loginResult = channel.readOutbound();
+        assertThat(loginResult.getStatus(), is(Status.FAILED));
+        assertThat(loginResult.getErrorCode(), 
is(XOpenSQLState.NOT_FOUND.getValue()));
+        assertFalse(channel.isOpen());
+    }
+    
     @Test
     void assertLoginRequestSucceed() {
         channel.connect(new InetSocketAddress("127.0.0.1", 3307));

Reply via email to