You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/11/03 08:28:55 UTC

(shardingsphere) branch master updated: Add more test cases on BroadcastRouteEngineFactory (#33509)

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 34e8da9bbbf Add more test cases on BroadcastRouteEngineFactory (#33509)
34e8da9bbbf is described below

commit 34e8da9bbbf5e1be9ba892ff061cd8c933994450
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Nov 3 16:28:50 2024 +0800

    Add more test cases on BroadcastRouteEngineFactory (#33509)
---
 .../broadcast/route/engine/BroadcastRouteEngineFactoryTest.java          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/route/engine/BroadcastRouteEngineFactoryTest.java b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/route/engine/BroadcastRouteEngineFactoryTest.java
index 4f0d8b335b6..f88f78184dc 100644
--- a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/route/engine/BroadcastRouteEngineFactoryTest.java
+++ b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/route/engine/BroadcastRouteEngineFactoryTest.java
@@ -114,6 +114,7 @@ class BroadcastRouteEngineFactoryTest {
     @Test
     void assertNewInstanceWithCursorAvailableAndNotTableAvailable() {
         SQLStatementContext sqlStatementContext = mock(SQLStatementContext.class, withSettings().extraInterfaces(CursorAvailable.class));
+        when(sqlStatementContext.getSqlStatement()).thenReturn(mock(DDLStatement.class));
         when(queryContext.getSqlStatementContext()).thenReturn(sqlStatementContext);
         assertThat(BroadcastRouteEngineFactory.newInstance(rule, database, queryContext), instanceOf(BroadcastIgnoreRouteEngine.class));
     }