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 9d5fc4d2a9d Refactor ListenerAssistedChangedHandlerTest (#34216)
9d5fc4d2a9d is described below

commit 9d5fc4d2a9df95caf6954ed6e73aab15a78a51bb
Author: Liang Zhang <zhangli...@apache.org>
AuthorDate: Wed Jan 1 01:56:18 2025 +0800

    Refactor ListenerAssistedChangedHandlerTest (#34216)
---
 .../dispatch/handler/type/ListenerAssistedChangedHandlerTest.java     | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/handler/type/ListenerAssistedChangedHandlerTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/handler/type/ListenerAssistedChangedHandlerTest.java
index f227c6c8411..a97ed45b7d6 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/handler/type/ListenerAssistedChangedHandlerTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/handler/type/ListenerAssistedChangedHandlerTest.java
@@ -17,6 +17,7 @@
 
 package 
org.apache.shardingsphere.mode.manager.cluster.event.dispatch.handler.type;
 
+import 
org.apache.shardingsphere.infra.config.props.temporary.TemporaryConfigurationProperties;
 import org.apache.shardingsphere.infra.instance.metadata.InstanceType;
 import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.mode.event.DataChangedEvent;
@@ -31,6 +32,8 @@ import org.mockito.Answers;
 import org.mockito.Mock;
 import org.mockito.junit.jupiter.MockitoExtension;
 
+import java.util.Properties;
+
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.times;
@@ -51,6 +54,7 @@ class ListenerAssistedChangedHandlerTest {
     @BeforeEach
     void setUp() {
         
when(contextManager.getPersistServiceFacade().getRepository()).thenReturn(repository);
+        
when(contextManager.getMetaDataContexts().getMetaData().getTemporaryProps()).thenReturn(new
 TemporaryConfigurationProperties(new Properties()));
         handler = 
ShardingSphereServiceLoader.getServiceInstances(DataChangedEventHandler.class).stream()
                 .filter(each -> 
each.getSubscribedKey().equals("/states/listener_assisted")).findFirst().orElse(null);
     }

Reply via email to