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 9fe831adaef Refactor ShardingSphereTableRowDataPersistServiceTest
(#32981)
9fe831adaef is described below
commit 9fe831adaefc86dd42432f04be24af9c32cb7a90
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Sep 24 19:01:57 2024 +0800
Refactor ShardingSphereTableRowDataPersistServiceTest (#32981)
---
.../service/schema/ShardingSphereTableRowDataPersistServiceTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/service/schema/ShardingSphereTableRowDataPersistServiceTest.java
b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/service/schema/ShardingSphereTableRowDataPersistServiceTest.java
index 746d185446b..0237e964f18 100644
---
a/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/service/schema/ShardingSphereTableRowDataPersistServiceTest.java
+++
b/kernel/metadata/core/src/test/java/org/apache/shardingsphere/metadata/persist/service/schema/ShardingSphereTableRowDataPersistServiceTest.java
@@ -60,7 +60,7 @@ class ShardingSphereTableRowDataPersistServiceTest {
YamlShardingSphereRowData rowData = new YamlShardingSphereRowData();
rowData.setUniqueKey("foo_key");
persistService.persist("foo_db", "foo_schema", "foo_tbl",
Collections.singletonList(rowData));
-
verify(repository).persist("/statistics/databases/foo_db/schemas/foo_schema/tables/foo_tbl/foo_key",
"uniqueKey: foo_key\n");
+
verify(repository).persist("/statistics/databases/foo_db/schemas/foo_schema/tables/foo_tbl/foo_key",
"uniqueKey: foo_key" + System.lineSeparator());
}
@Test
@@ -74,7 +74,7 @@ class ShardingSphereTableRowDataPersistServiceTest {
@Test
void assertLoadWithRowData() {
when(repository.getChildrenKeys("/statistics/databases/foo_db/schemas/foo_schema/tables/foo_tbl")).thenReturn(Collections.singletonList("foo_tbl"));
-
when(repository.query("/statistics/databases/foo_db/schemas/foo_schema/tables/foo_tbl/foo_tbl")).thenReturn("uniqueKey:
foo_key\n");
+
when(repository.query("/statistics/databases/foo_db/schemas/foo_schema/tables/foo_tbl/foo_tbl")).thenReturn("uniqueKey:
foo_key" + System.lineSeparator());
ShardingSphereTable table = mock(ShardingSphereTable.class);
ShardingSphereTableData actual = persistService.load("foo_db",
"foo_schema", "foo_tbl", table);
assertThat(actual.getName(), is("foo_tbl"));