From 5fc4a7ce81b539ec308f00c87adc40113b6fcec4 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Tue, 31 Dec 2024 20:44:03 +0800 Subject: [PATCH] Use DataChangedEventHandler to instead of DispatchEventBuilder --- .../listener/DataChangedEventListenerRegistryTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/listener/DataChangedEventListenerRegistryTest.java b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/listener/DataChangedEventListenerRegistryTest.java index 7cf9672d944b8..bf682e541857c 100644 --- a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/listener/DataChangedEventListenerRegistryTest.java +++ b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/event/dispatch/listener/DataChangedEventListenerRegistryTest.java @@ -19,7 +19,7 @@ import org.apache.shardingsphere.mode.manager.ContextManager; import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.DatabaseMetaDataChangedListener; -import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.GlobalMetaDataChangedListener; +import org.apache.shardingsphere.mode.manager.cluster.event.dispatch.listener.type.GlobalMetaDataChangedHandler; import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository; import org.junit.jupiter.api.Test; @@ -44,6 +44,6 @@ void assertRegister() { DataChangedEventListenerRegistry registry = new DataChangedEventListenerRegistry(contextManager, Collections.singleton("foo_db")); registry.register(); verify(repository).watch(eq("/metadata/foo_db"), any(DatabaseMetaDataChangedListener.class)); - verify(repository, atLeastOnce()).watch(anyString(), any(GlobalMetaDataChangedListener.class)); + verify(repository, atLeastOnce()).watch(anyString(), any(GlobalMetaDataChangedHandler.class)); } }