This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 5727cb3c5a6 Fix actual data sources were closed unexpectedly in
Cluster mode JDBC E2E (#28301)
5727cb3c5a6 is described below
commit 5727cb3c5a681ae41407cb61824b265d23d1566f
Author: 吴伟杰 <[email protected]>
AuthorDate: Tue Aug 29 14:17:42 2023 +0800
Fix actual data sources were closed unexpectedly in Cluster mode JDBC E2E
(#28301)
---
.../env/container/atomic/adapter/impl/ShardingSphereJdbcContainer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/adapter/impl/ShardingSphereJdbcContainer.java
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/adapter/impl/ShardingSphereJdbcContainer.java
index 96e08884393..a6bb7709abb 100644
---
a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/adapter/impl/ShardingSphereJdbcContainer.java
+++
b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/adapter/impl/ShardingSphereJdbcContainer.java
@@ -35,6 +35,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.sql.SQLException;
+import java.util.Collections;
import java.util.concurrent.atomic.AtomicReference;
/**
@@ -82,7 +83,7 @@ public final class ShardingSphereJdbcContainer implements
EmbeddedITContainer, A
private DataSource createGovernanceClientDataSource(final String
serverLists) {
YamlRootConfiguration rootConfig = YamlEngine.unmarshal(new
File(scenarioCommonPath.getRuleConfigurationFile(databaseType)),
YamlRootConfiguration.class);
rootConfig.setMode(createYamlModeConfiguration(serverLists));
- return
YamlShardingSphereDataSourceFactory.createDataSource(storageContainer.getActualDataSourceMap(),
YamlEngine.marshal(rootConfig).getBytes(StandardCharsets.UTF_8));
+ return
YamlShardingSphereDataSourceFactory.createDataSource(Collections.emptyMap(),
YamlEngine.marshal(rootConfig).getBytes(StandardCharsets.UTF_8));
}
private YamlModeConfiguration createYamlModeConfiguration(final String
serverLists) {