You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2024/04/30 03:06:05 UTC
(shardingsphere) branch master updated: Revise test cases (#31069)
This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 53d9f3f1f30 Revise test cases (#31069)
53d9f3f1f30 is described below
commit 53d9f3f1f302f29b9db73523202ca69a855e0a2d
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Apr 30 11:05:58 2024 +0800
Revise test cases (#31069)
---
...BroadcastRuleConfigurationRepositoryTupleSwapperTest.java | 12 ++++--------
.../EncryptRuleConfigurationRepositoryTupleSwapperTest.java | 6 +++---
.../swapper/MaskRuleConfigurationRepositoryTupleSwapper.java | 6 +++---
.../MaskRuleConfigurationRepositoryTupleSwapperTest.java | 6 +++---
...SplittingRuleConfigurationRepositoryTupleSwapperTest.java | 6 +++---
.../ShadowRuleConfigurationRepositoryTupleSwapperTest.java | 6 +++---
.../ShardingRuleConfigurationRepositoryTupleSwapperTest.java | 6 +++---
...AuthorityRuleConfigurationRepositoryTupleSwapperTest.java | 12 ++++--------
...obalClockRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
.../LoggingRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
.../SingleRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
...ederationRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
...SQLParserRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
...ranslatorRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
.../TrafficRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
...ansactionRuleConfigurationRepositoryTupleSwapperTest.java | 2 +-
16 files changed, 34 insertions(+), 42 deletions(-)
diff --git a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapperTest.java b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapperTest.java
index e671d634dd4..b0d219df024 100644
--- a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapperTest.java
@@ -37,24 +37,20 @@ class BroadcastRuleConfigurationRepositoryTupleSwapperTest {
private final BroadcastRuleConfigurationRepositoryTupleSwapper swapper = new BroadcastRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapEmptyConfigToDataNodes() {
+ void assertSwapToRepositoryTuplesWithEmptyRule() {
assertTrue(swapper.swapToRepositoryTuples(new BroadcastRuleConfiguration(Collections.emptyList())).isEmpty());
}
@Test
- void assertSwapFullConfigToDataNodes() {
- Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(createMaximumBroadcastRule());
+ void assertSwapToRepositoryTuples() {
+ Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(new BroadcastRuleConfiguration(Arrays.asList("foo_table", "foo_table2")));
assertThat(actual.size(), is(1));
Iterator<RepositoryTuple> iterator = actual.iterator();
assertThat(iterator.next().getKey(), is("tables"));
}
- private BroadcastRuleConfiguration createMaximumBroadcastRule() {
- return new BroadcastRuleConfiguration(Arrays.asList("foo_table", "foo_table2"));
- }
-
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(swapper.swapToObject(Collections.emptyList()).isPresent());
}
diff --git a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapperTest.java b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapperTest.java
index dd5501e04af..be16af7bdbb 100644
--- a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapperTest.java
@@ -42,12 +42,12 @@ class EncryptRuleConfigurationRepositoryTupleSwapperTest {
private final EncryptRuleConfigurationRepositoryTupleSwapper swapper = new EncryptRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapEmptyConfigToDataNodes() {
+ void assertSwapToRepositoryTuplesWithEmptyRule() {
assertTrue(swapper.swapToRepositoryTuples(new EncryptRuleConfiguration(Collections.emptyList(), Collections.emptyMap())).isEmpty());
}
@Test
- void assertSwapFullConfigToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(createMaximumEncryptRule());
assertThat(actual.size(), is(2));
Iterator<RepositoryTuple> iterator = actual.iterator();
@@ -62,7 +62,7 @@ class EncryptRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(swapper.swapToObject(Collections.emptyList()).isPresent());
}
diff --git a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
index 50395b4fb26..0ec9d9b46d5 100644
--- a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
+++ b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
@@ -50,12 +50,12 @@ public final class MaskRuleConfigurationRepositoryTupleSwapper implements Reposi
public Collection<RepositoryTuple> swapToRepositoryTuples(final MaskRuleConfiguration data) {
Collection<RepositoryTuple> result = new LinkedList<>();
YamlMaskRuleConfiguration yamlRuleConfig = ruleConfigSwapper.swapToYamlConfiguration(data);
- for (YamlMaskTableRuleConfiguration each : yamlRuleConfig.getTables().values()) {
- result.add(new RepositoryTuple(maskRuleNodePath.getNamedItem(MaskRuleNodePathProvider.TABLES).getPath(each.getName()), YamlEngine.marshal(each)));
- }
for (Entry<String, YamlAlgorithmConfiguration> entry : yamlRuleConfig.getMaskAlgorithms().entrySet()) {
result.add(new RepositoryTuple(maskRuleNodePath.getNamedItem(MaskRuleNodePathProvider.MASK_ALGORITHMS).getPath(entry.getKey()), YamlEngine.marshal(entry.getValue())));
}
+ for (YamlMaskTableRuleConfiguration each : yamlRuleConfig.getTables().values()) {
+ result.add(new RepositoryTuple(maskRuleNodePath.getNamedItem(MaskRuleNodePathProvider.TABLES).getPath(each.getName()), YamlEngine.marshal(each)));
+ }
return result;
}
diff --git a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapperTest.java b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapperTest.java
index 9a206bdd176..1fe8e3afc0b 100644
--- a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapperTest.java
@@ -40,13 +40,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class MaskRuleConfigurationRepositoryTupleSwapperTest {
@Test
- void assertSwapEmptyConfigurationToDataNodes() {
+ void assertSwapToRepositoryTuplesWithEmptyRule() {
MaskRuleConfiguration ruleConfig = new MaskRuleConfiguration(Collections.emptyList(), Collections.emptyMap());
assertTrue(new MaskRuleConfigurationRepositoryTupleSwapper().swapToRepositoryTuples(ruleConfig).isEmpty());
}
@Test
- void assertSwapFullConfigurationToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = new MaskRuleConfigurationRepositoryTupleSwapper().swapToRepositoryTuples(createMaximumMaskRule());
assertThat(actual.size(), is(2));
Iterator<RepositoryTuple> iterator = actual.iterator();
@@ -61,7 +61,7 @@ class MaskRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(new MaskRuleConfigurationRepositoryTupleSwapper().swapToObject(new LinkedList<>()).isPresent());
}
diff --git a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest.java b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest.java
index d0d11e9a7a0..3736f9d33f4 100644
--- a/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/readwrite-splitting/core/src/test/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest.java
@@ -41,7 +41,7 @@ class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest {
private final ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper swapper = new ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodesLoadBalancersEmpty() {
+ void assertSwapToRepositoryTuplesWithEmptyLoadBalancer() {
ReadwriteSplittingRuleConfiguration ruleConfig = new ReadwriteSplittingRuleConfiguration(Collections.singleton(new ReadwriteSplittingDataSourceGroupRuleConfiguration("group_0",
"write_ds", Arrays.asList("read_ds_0", "read_ds_1"), null)), Collections.emptyMap());
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(ruleConfig);
@@ -50,7 +50,7 @@ class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToDataNodesLoadBalancers() {
+ void assertSwapToRepositoryTuples() {
ReadwriteSplittingRuleConfiguration ruleConfig = new ReadwriteSplittingRuleConfiguration(Collections.singleton(new ReadwriteSplittingDataSourceGroupRuleConfiguration("group_0",
"write_ds", Arrays.asList("read_ds_0", "read_ds_1"), "random")), Collections.singletonMap("random", new AlgorithmConfiguration("random", new Properties())));
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(ruleConfig);
@@ -61,7 +61,7 @@ class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(swapper.swapToObject(Collections.emptyList()).isPresent());
}
diff --git a/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapperTest.java b/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapperTest.java
index 80238b3fa25..8cb8e895025 100644
--- a/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/shadow/core/src/test/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapperTest.java
@@ -44,12 +44,12 @@ class ShadowRuleConfigurationRepositoryTupleSwapperTest {
private final ShadowRuleConfigurationRepositoryTupleSwapper swapper = new ShadowRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapEmptyConfigToDataNodes() {
+ void assertSwapToRepositoryTuplesWithEmptyRule() {
assertTrue(swapper.swapToRepositoryTuples(new ShadowRuleConfiguration()).isEmpty());
}
@Test
- void assertSwapFullConfigToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(createMaximumShadowRule());
assertThat(actual.size(), is(4));
Iterator<RepositoryTuple> iterator = actual.iterator();
@@ -75,7 +75,7 @@ class ShadowRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(swapper.swapToObject(Collections.emptyList()).isPresent());
}
diff --git a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapperTest.java b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapperTest.java
index 30efeda4f2f..4c6accf6187 100644
--- a/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/features/sharding/core/src/test/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapperTest.java
@@ -48,12 +48,12 @@ class ShardingRuleConfigurationRepositoryTupleSwapperTest {
private final ShardingRuleConfigurationRepositoryTupleSwapper swapper = new ShardingRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapEmptyConfigToDataNodes() {
+ void assertSwapToRepositoryTuplesWithEmptyRule() {
assertTrue(swapper.swapToRepositoryTuples(new ShardingRuleConfiguration()).isEmpty());
}
@Test
- void assertSwapFullConfigToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(createMaximumShardingRule());
assertThat(actual.size(), is(15));
Iterator<RepositoryTuple> iterator = actual.iterator();
@@ -111,7 +111,7 @@ class ShardingRuleConfigurationRepositoryTupleSwapperTest {
}
@Test
- void assertSwapToObjectEmpty() {
+ void assertSwapToObjectWithEmptyTuple() {
assertFalse(swapper.swapToObject(Collections.emptyList()).isPresent());
}
diff --git a/kernel/authority/core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/authority/core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapperTest.java
index 025d7ced032..c476f04ac3e 100644
--- a/kernel/authority/core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/authority/core/src/test/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapperTest.java
@@ -21,6 +21,8 @@ import org.apache.shardingsphere.authority.config.AuthorityRuleConfiguration;
import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
import org.apache.shardingsphere.infra.metadata.user.ShardingSphereUser;
import org.apache.shardingsphere.infra.util.yaml.datanode.RepositoryTuple;
+import org.apache.shardingsphere.test.util.PropertiesBuilder;
+import org.apache.shardingsphere.test.util.PropertiesBuilder.Property;
import org.junit.jupiter.api.Test;
import java.util.Collection;
@@ -36,10 +38,10 @@ class AuthorityRuleConfigurationRepositoryTupleSwapperTest {
private final AuthorityRuleConfigurationRepositoryTupleSwapper swapper = new AuthorityRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<ShardingSphereUser> users = Collections.singleton(new ShardingSphereUser("root", "", "localhost"));
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(new AuthorityRuleConfiguration(users, new AlgorithmConfiguration("ALL_PERMITTED", new Properties()),
- Collections.singletonMap("md5", new AlgorithmConfiguration("MD5", createProperties())), "scram_sha256"));
+ Collections.singletonMap("md5", new AlgorithmConfiguration("MD5", PropertiesBuilder.build(new Property("proxy-frontend-database-protocol-type", "openGauss")))), "scram_sha256"));
RepositoryTuple repositoryTuple = actual.iterator().next();
assertThat(repositoryTuple.getKey(), is("authority"));
assertThat(repositoryTuple.getValue(), containsString("user: root@localhost"));
@@ -49,10 +51,4 @@ class AuthorityRuleConfigurationRepositoryTupleSwapperTest {
assertThat(repositoryTuple.getValue(), containsString("type: MD5"));
assertThat(repositoryTuple.getValue(), containsString("proxy-frontend-database-protocol-type: openGauss"));
}
-
- private Properties createProperties() {
- Properties result = new Properties();
- result.put("proxy-frontend-database-protocol-type", "openGauss");
- return result;
- }
}
diff --git a/kernel/global-clock/core/src/test/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/global-clock/core/src/test/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapperTest.java
index bb50af09e23..b99dc673f5d 100644
--- a/kernel/global-clock/core/src/test/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/global-clock/core/src/test/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapperTest.java
@@ -32,7 +32,7 @@ class GlobalClockRuleConfigurationRepositoryTupleSwapperTest {
private final GlobalClockRuleConfigurationRepositoryTupleSwapper swapper = new GlobalClockRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(new GlobalClockRuleConfiguration("", "", false, new Properties()));
assertThat(actual.iterator().next().getKey(), is("global_clock"));
}
diff --git a/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapperTest.java
index ac9a7eef365..22d4a7dbe88 100644
--- a/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/logging/core/src/test/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapperTest.java
@@ -28,7 +28,7 @@ class LoggingRuleConfigurationRepositoryTupleSwapperTest {
private final LoggingRuleConfigurationRepositoryTupleSwapper swapper = new LoggingRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new DefaultLoggingRuleConfigurationBuilder().build()).iterator().next().getKey(), is("logging"));
}
}
diff --git a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapperTest.java
index 3b2916a1160..ca841dd8a76 100644
--- a/kernel/single/core/src/test/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/single/core/src/test/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapperTest.java
@@ -28,7 +28,7 @@ class SingleRuleConfigurationRepositoryTupleSwapperTest {
private final SingleRuleConfigurationRepositoryTupleSwapper swapper = new SingleRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new SingleRuleConfiguration()).iterator().next().getKey(), is("tables"));
}
}
diff --git a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapperTest.java
index b8150ba71dc..064491d3b73 100644
--- a/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/sql-federation/core/src/test/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapperTest.java
@@ -29,7 +29,7 @@ class SQLFederationRuleConfigurationRepositoryTupleSwapperTest {
private final SQLFederationRuleConfigurationRepositoryTupleSwapper swapper = new SQLFederationRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new SQLFederationRuleConfiguration(false, false, new CacheOption(0, 0))).iterator().next().getKey(), is("sql_federation"));
}
}
diff --git a/kernel/sql-parser/core/src/test/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/sql-parser/core/src/test/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapperTest.java
index a8accd5fee7..5dcf75d1d9e 100644
--- a/kernel/sql-parser/core/src/test/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/sql-parser/core/src/test/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapperTest.java
@@ -29,7 +29,7 @@ class SQLParserRuleConfigurationRepositoryTupleSwapperTest {
private final SQLParserRuleConfigurationRepositoryTupleSwapper swapper = new SQLParserRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new SQLParserRuleConfiguration(DefaultSQLParserRuleConfigurationBuilder.PARSE_TREE_CACHE_OPTION,
DefaultSQLParserRuleConfigurationBuilder.SQL_STATEMENT_CACHE_OPTION)).iterator().next().getKey(), is("sql_parser"));
}
diff --git a/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapperTest.java
index b5c077716ea..fb866849c80 100644
--- a/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/sql-translator/core/src/test/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapperTest.java
@@ -28,7 +28,7 @@ class SQLTranslatorRuleConfigurationRepositoryTupleSwapperTest {
private final SQLTranslatorRuleConfigurationRepositoryTupleSwapper swapper = new SQLTranslatorRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new DefaultSQLTranslatorRuleConfigurationBuilder().build()).iterator().next().getKey(), is("sql_translator"));
}
}
diff --git a/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapperTest.java
index b3a051974d1..78d4c39f464 100644
--- a/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/traffic/core/src/test/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapperTest.java
@@ -28,7 +28,7 @@ class TrafficRuleConfigurationRepositoryTupleSwapperTest {
private final TrafficRuleConfigurationRepositoryTupleSwapper swapper = new TrafficRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
assertThat(swapper.swapToRepositoryTuples(new TrafficRuleConfiguration()).iterator().next().getKey(), is("traffic"));
}
}
diff --git a/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapperTest.java b/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapperTest.java
index 2811accd9d7..7e77eac618f 100644
--- a/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapperTest.java
+++ b/kernel/transaction/core/src/test/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapperTest.java
@@ -32,7 +32,7 @@ class TransactionRuleConfigurationRepositoryTupleSwapperTest {
private final TransactionRuleConfigurationRepositoryTupleSwapper swapper = new TransactionRuleConfigurationRepositoryTupleSwapper();
@Test
- void assertSwapToDataNodes() {
+ void assertSwapToRepositoryTuples() {
Collection<RepositoryTuple> actual = swapper.swapToRepositoryTuples(new TransactionRuleConfiguration("", "", new Properties()));
assertThat(actual.iterator().next().getKey(), is("transaction"));
}