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 b34cb490adc assertUpdate Test error due to environment dependency of newLine character in class QualifiedDataSourceStatePersistServiceTest (#32976) b34cb490adc is described below commit b34cb490adc5853aebaec9b6d06aab34146ce32a Author: Yash-cor <yash.tiw...@coriolis.co.in> AuthorDate: Tue Sep 24 16:14:38 2024 +0530 assertUpdate Test error due to environment dependency of newLine character in class QualifiedDataSourceStatePersistServiceTest (#32976) * Added System.lineSeparator() in case of \n as this newline character was behaving differently on different environments giving test error. * Made checkstyle Correction --- .../persist/service/QualifiedDataSourceStatePersistServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java b/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java index d48f237a3cf..dfadba93ca5 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java +++ b/mode/core/src/test/java/org/apache/shardingsphere/mode/persist/service/QualifiedDataSourceStatePersistServiceTest.java @@ -59,6 +59,6 @@ class QualifiedDataSourceStatePersistServiceTest { @Test void assertUpdate() { qualifiedDataSourceStatePersistService.update("foo_db", "foo_group", "foo_ds", DataSourceState.ENABLED); - verify(repository).persist("/nodes/qualified_data_sources/foo_db.foo_group.foo_ds", "state: ENABLED\n"); + verify(repository).persist("/nodes/qualified_data_sources/foo_db.foo_group.foo_ds", "state: ENABLED" + System.lineSeparator()); } }