This is an automated email from the ASF dual-hosted git repository.
zhaojinchao 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 597da939c62 Code format for test cases (#31031)
597da939c62 is described below
commit 597da939c62cbd9bb34d91c5cf837d08ca3e6831
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Apr 27 15:26:03 2024 +0800
Code format for test cases (#31031)
* Code format for test cases
* Code format for test cases
* Code format for test cases
* Code format for test cases
---
.../swapper/YamlBroadcastDataNodeRuleConfigurationSwapperTest.java | 4 ++--
.../yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git
a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastDataNodeRuleConfigurationSwapperTest.java
b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastDataNodeRuleConfigurationSwapperTest.java
index 220b61d8f1d..5a83e57aa3d 100644
---
a/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastDataNodeRuleConfigurationSwapperTest.java
+++
b/features/broadcast/core/src/test/java/org/apache/shardingsphere/broadcast/yaml/swapper/YamlBroadcastDataNodeRuleConfigurationSwapperTest.java
@@ -60,8 +60,8 @@ class YamlBroadcastDataNodeRuleConfigurationSwapperTest {
@Test
void assertSwapToObject() {
- Optional<BroadcastRuleConfiguration> actual = swapper.swapToObject(
- Collections.singleton(new
RepositoryTuple("/metadata/foo_db/rules/broadcast/tables", "tables:\n" + "-
foo_table\n" + "- foo_table2\n")));
+ RepositoryTuple repositoryTuple = new
RepositoryTuple("/metadata/foo_db/rules/broadcast/tables", "tables:\n-
foo_table\n- foo_table2\n");
+ Optional<BroadcastRuleConfiguration> actual =
swapper.swapToObject(Collections.singleton(repositoryTuple));
assertTrue(actual.isPresent());
assertThat(actual.get().getTables().size(), is(2));
Iterator<String> iterator = actual.get().getTables().iterator();
diff --git
a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
index e19fe4fa145..64c8a266e32 100644
---
a/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
+++
b/features/mask/core/src/test/java/org/apache/shardingsphere/mask/yaml/swapper/YamlMaskDataNodeRuleConfigurationSwapperTest.java
@@ -72,7 +72,8 @@ class YamlMaskDataNodeRuleConfigurationSwapperTest {
+ " foo_column:\n"
+ " logicColumn: foo_column\n"
+ " maskAlgorithm: FIXTURE\n"
- + "name: foo\n"), new
RepositoryTuple("/metadata/foo_db/rules/mask/mask_algorithms/FIXTURE/versions/0",
"type: FIXTURE\n"));
+ + "name: foo\n"),
+ new
RepositoryTuple("/metadata/foo_db/rules/mask/mask_algorithms/FIXTURE/versions/0",
"type: FIXTURE\n"));
Optional<MaskRuleConfiguration> actual = new
YamlMaskDataNodeRuleConfigurationSwapper().swapToObject(repositoryTuples);
assertTrue(actual.isPresent());
assertThat(actual.get().getTables().size(), is(1));