terrymanu commented on a change in pull request #5614:
URL: https://github.com/apache/shardingsphere/pull/5614#discussion_r428685261



##########
File path: 
sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-configcenter/src/test/java/org/apache/shardingsphere/orchestration/core/configcenter/ConfigCenterTest.java
##########
@@ -552,4 +465,13 @@ private void 
assertDataSourceConfigurationWithConnectionInitSqls(final DataSourc
         assertThat(actual.getProperties().get("password"), 
is(expected.getProperties().get("password")));
         assertThat(actual.getProperties().get("connectionInitSqls"), 
is(expected.getProperties().get("connectionInitSqls")));
     }
+
+    private static String readYamlFileIntoString(final String fileName) {
+        try {
+            return (new 
String(Files.readAllBytes(Paths.get(ClassLoader.getSystemResource(fileName).toURI())))).replaceAll("#.*\n",
 "");

Review comment:
       It may simply if we just ref #5629.
   Do not need try to parse yaml, just read text from file.
   
   FYI:
   ```java
       @SneakyThrows
       private String readYAML(final String yamlFile) {
           return 
Files.readAllLines(Paths.get(ClassLoader.getSystemResource(yamlFile).toURI())).stream().map(each
 -> each + System.lineSeparator()).collect(Collectors.joining());
       }
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to