sandynz commented on code in PR #24376:
URL: https://github.com/apache/shardingsphere/pull/24376#discussion_r1124132687


##########
test/e2e/pipeline/src/test/java/org/apache/shardingsphere/test/e2e/data/pipeline/cases/base/PipelineBaseE2EIT.java:
##########
@@ -383,4 +377,19 @@ protected void assertGreaterThanOrderTableInitRows(final 
int tableInitRows, fina
         int recordsCount = getTargetTableRecordsCount(tableName);
         assertTrue("actual count " + recordsCount, recordsCount > 
tableInitRows);
     }
+    
+    protected DataSource generateShardingSphereDataSourceFromProxy() throws 
SQLException {
+        String dataSourceConfigText = queryForListWithLog("EXPORT DATABASE 
CONFIGURATION").get(0).get("result").toString();
+        if (PipelineEnvTypeEnum.DOCKER == ENV.getItEnvType()) {
+            DockerStorageContainer storageContainer = 
((DockerContainerComposer) containerComposer).getStorageContainers().get(0);
+            String sourceUrl = String.join(":", 
storageContainer.getNetworkAliases().get(0), 
Integer.toString(storageContainer.getExposedPort()));
+            String targetUrl = String.join(":", storageContainer.getHost(), 
Integer.toString(storageContainer.getMappedPort()));
+            dataSourceConfigText = dataSourceConfigText.replace(sourceUrl, 
targetUrl);
+        }
+        YamlRootConfiguration rootConfig = 
YamlEngine.unmarshal(dataSourceConfigText, YamlRootConfiguration.class);
+        for (Map<String, Object> each : rootConfig.getDataSources().values()) {

Review Comment:
   OK, I had a mistake



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to