You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2022/06/09 10:57:57 UTC

[shardingsphere] branch master updated: Revise ParseDistSQLBackendHandlerTest (#18266)

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

menghaoran 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 8307b4f0065 Revise ParseDistSQLBackendHandlerTest (#18266)
8307b4f0065 is described below

commit 8307b4f0065ae68f8b0a43bef1a22daaac855a98
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu Jun 9 18:57:51 2022 +0800

    Revise ParseDistSQLBackendHandlerTest (#18266)
---
 .../text/distsql/ral/advance/ParseDistSQLBackendHandlerTest.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/advance/ParseDistSQLBackendHandlerTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/advance/ParseDistSQLBackendHandlerTest.java
index 3ddf8027e51..46c4a4e1c1e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/advance/ParseDistSQLBackendHandlerTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/advance/ParseDistSQLBackendHandlerTest.java
@@ -53,9 +53,6 @@ public final class ParseDistSQLBackendHandlerTest extends ProxyContextRestorer {
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private ContextManager contextManager;
     
-    @Mock
-    private MySQLDatabaseType mySQLDatabaseType;
-    
     @Mock
     private ConnectionSession connectionSession;
     
@@ -63,8 +60,7 @@ public final class ParseDistSQLBackendHandlerTest extends ProxyContextRestorer {
     public void setUp() throws SQLException {
         ProxyContext.init(contextManager);
         when(contextManager.getMetaDataContexts().getMetaData().getGlobalRuleMetaData().findSingleRule(SQLParserRule.class)).thenReturn(Optional.of(sqlParserRule));
-        when(mySQLDatabaseType.getType()).thenReturn("MySQL");
-        when(connectionSession.getDatabaseType()).thenReturn(mySQLDatabaseType);
+        when(connectionSession.getDatabaseType()).thenReturn(new MySQLDatabaseType());
     }
     
     @Test