sukumaar commented on a change in pull request #5614:
URL: https://github.com/apache/shardingsphere/pull/5614#discussion_r426256783
##########
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:
If I try to use YAML by any of these below way:
```
return new Yaml().dumpAsMap(new Yaml().load(yamlString));
return new Yaml().dump(yamlString)
return new Yaml().dumpAsMap(yamlString)
```
then I am getting error:
```
Can't construct a java object for
tag:yaml.org,2002:org.apache.shardingsphere.core.rule.DataSourceParameter;
exception=Class not found:
org.apache.shardingsphere.core.rule.DataSourceParameter
```
this is happening for **data source parameter yaml**
it is creating object with this class
**org.apache.shardingsphere.core.rule.DataSourceParameter** but it is not
present in the project so I changed it to
**org.apache.shardingsphere.shardingproxy.config.yaml.YamlDataSourceParameter**
which is present
but getting this error:
```
Can't construct a java object for
tag:yaml.org,2002:org.apache.shardingsphere.shardingproxy.config.yaml.YamlDataSourceParameter;
exception=Class not found:
org.apache.shardingsphere.shardingproxy.config.yaml.YamlDataSourceParameter
```
----------------------------------------------------------------
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:
[email protected]