From b808d5b804d5e67b27df50d6f9abc3e7d43d7b17 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Thu, 7 Nov 2024 14:53:49 +0800 Subject: [PATCH] Refactor ReadwriteSplittingExportableRuleAttributeTest (#33584) --- .../ReadwriteSplittingExportableRuleAttributeTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingExportableRuleAttributeTest.java b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingExportableRuleAttributeTest.java index b57875bfe6364..bc0c7b75c549f 100644 --- a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingExportableRuleAttributeTest.java +++ b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingExportableRuleAttributeTest.java @@ -36,9 +36,9 @@ class ReadwriteSplittingExportableRuleAttributeTest { @Test void assertGetExportData() { - ReadwriteSplittingDataSourceGroupRuleConfiguration config = new ReadwriteSplittingDataSourceGroupRuleConfiguration("foo_group", "write_ds", Arrays.asList("read_ds0", "read_ds1"), "foo_algo"); - Map dataSourceGroupRules = new HashMap<>(2, 1F); + Map dataSourceGroupRules = new HashMap<>(); dataSourceGroupRules.put("ignored_group", mock(ReadwriteSplittingDataSourceGroupRule.class)); + ReadwriteSplittingDataSourceGroupRuleConfiguration config = new ReadwriteSplittingDataSourceGroupRuleConfiguration("foo_group", "write_ds", Arrays.asList("read_ds0", "read_ds1"), "foo_algo"); dataSourceGroupRules.put("foo_group", new ReadwriteSplittingDataSourceGroupRule(config, TransactionalReadQueryStrategy.FIXED, null)); ReadwriteSplittingExportableRuleAttribute ruleAttribute = new ReadwriteSplittingExportableRuleAttribute(dataSourceGroupRules); Map actual = ruleAttribute.getExportData();