Skip to content

Commit

Permalink
Refactor ReadwriteSplittingExportableRuleAttributeTest (#33584)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Nov 7, 2024
1 parent 29eda60 commit b808d5b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, ReadwriteSplittingDataSourceGroupRule> dataSourceGroupRules = new HashMap<>(2, 1F);
Map<String, ReadwriteSplittingDataSourceGroupRule> 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<String, Object> actual = ruleAttribute.getExportData();
Expand Down

0 comments on commit b808d5b

Please sign in to comment.