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 e86ca4d0f6b Refactor AlgorithmChangedProcessorTest (#33487)
e86ca4d0f6b is described below

commit e86ca4d0f6b0e7b375567a45ca8e9380a91bcfc1
Author: Liang Zhang <[email protected]>
AuthorDate: Fri Nov 1 01:46:20 2024 +0800

    Refactor AlgorithmChangedProcessorTest (#33487)
---
 .../mode/processor/AlgorithmChangedProcessorTest.java               | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java
 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java
index 93ba50b3e61..b1ee1375479 100644
--- 
a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java
+++ 
b/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java
@@ -72,10 +72,11 @@ class AlgorithmChangedProcessorTest {
     
     @Test
     void assertChangeRuleItemConfiguration() {
+        AlterNamedRuleItemEvent event = new AlterNamedRuleItemEvent("", 
"bar_algo", "", "", "");
         AlgorithmChangedProcessorFixtureRuleConfiguration currentRuleConfig = 
new AlgorithmChangedProcessorFixtureRuleConfiguration();
         currentRuleConfig.getAlgorithmConfigurations().put("foo_algo", new 
AlgorithmConfiguration("FOO_FIXTURE", new Properties()));
         AlgorithmConfiguration toBeChangedItemConfig = new 
AlgorithmConfiguration("BAR_FIXTURE", new Properties());
-        processor.changeRuleItemConfiguration(new AlterNamedRuleItemEvent("", 
"bar_algo", "", "", ""), currentRuleConfig, toBeChangedItemConfig);
+        processor.changeRuleItemConfiguration(event, currentRuleConfig, 
toBeChangedItemConfig);
         assertThat(currentRuleConfig.getAlgorithmConfigurations().size(), 
is(2));
         
assertThat(currentRuleConfig.getAlgorithmConfigurations().get("foo_algo").getType(),
 is("FOO_FIXTURE"));
         
assertThat(currentRuleConfig.getAlgorithmConfigurations().get("bar_algo").getType(),
 is("BAR_FIXTURE"));
@@ -83,9 +84,10 @@ class AlgorithmChangedProcessorTest {
     
     @Test
     void assertDropRuleItemConfiguration() {
+        DropNamedRuleItemEvent event = new DropNamedRuleItemEvent("", 
"foo_algo", "");
         AlgorithmChangedProcessorFixtureRuleConfiguration currentRuleConfig = 
new AlgorithmChangedProcessorFixtureRuleConfiguration();
         currentRuleConfig.getAlgorithmConfigurations().put("foo_algo", new 
AlgorithmConfiguration("FOO_FIXTURE", new Properties()));
-        processor.dropRuleItemConfiguration(new DropNamedRuleItemEvent("", 
"foo_algo", ""), currentRuleConfig);
+        processor.dropRuleItemConfiguration(event, currentRuleConfig);
         assertTrue(currentRuleConfig.getAlgorithmConfigurations().isEmpty());
     }
 }

Reply via email to