This is an automated email from the ASF dual-hosted git repository.
menghaoran 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 7fb6177 fix ci (#11716)
7fb6177 is described below
commit 7fb6177dc57144f4b4256ea4095df23abb10f2ec
Author: Jieker <[email protected]>
AuthorDate: Mon Aug 9 16:48:02 2021 +0800
fix ci (#11716)
* fix ci
* little change
---
.../junit/container/adapter/impl/ShardingSphereJDBCContainer.java | 8 +++++---
.../src/test/resources/env/sharding_governance/rules.yaml | 5 ++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/adapter/impl/ShardingSphereJDBCContainer.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/adapter/impl/ShardingSphereJDBCContainer.java
index 69bf6d6..c35866a 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/adapter/impl/ShardingSphereJDBCContainer.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-fixture/src/test/java/org/apache/shardingsphere/test/integration/junit/container/adapter/impl/ShardingSphereJDBCContainer.java
@@ -17,6 +17,7 @@
package
org.apache.shardingsphere.test.integration.junit.container.adapter.impl;
+import com.google.common.base.Strings;
import
org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
import
org.apache.shardingsphere.driver.governance.internal.datasource.GovernanceShardingSphereDataSource;
import
org.apache.shardingsphere.driver.governance.internal.util.YamlGovernanceConfigurationSwapperUtil;
@@ -92,13 +93,14 @@ public final class ShardingSphereJDBCContainer extends
ShardingSphereAdapterCont
YamlGovernanceConfiguration governance =
configurations.getGovernance();
governance.getRegistryCenter().setServerLists(serverLists);
Properties properties = configurations.getProps();
+ String schemaName =
Strings.isNullOrEmpty(configurations.getSchemaName()) ?
DefaultSchema.LOGIC_NAME : configurations.getSchemaName();
if (configurations.getRules().isEmpty() ||
dataSourceMap.isEmpty()) {
- return new
GovernanceShardingSphereDataSource(DefaultSchema.LOGIC_NAME,
YamlGovernanceConfigurationSwapperUtil.marshal(governance));
+ return new GovernanceShardingSphereDataSource(schemaName,
YamlGovernanceConfigurationSwapperUtil.marshal(governance));
} else {
- return new
GovernanceShardingSphereDataSource(DefaultSchema.LOGIC_NAME, dataSourceMap, new
YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(configurations.getRules()),
+ return new GovernanceShardingSphereDataSource(schemaName,
dataSourceMap, new
YamlRuleConfigurationSwapperEngine().swapToRuleConfigurations(configurations.getRules()),
properties,
YamlGovernanceConfigurationSwapperUtil.marshal(governance));
}
- } catch (SQLException | IOException ex) {
+ } catch (final SQLException | IOException ex) {
throw new RuntimeException(ex);
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
index 62cf393..36a0fb1 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/env/sharding_governance/rules.yaml
@@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-governance:
+rules:
+- !GOVERNANCE
registryCenter:
type: ZooKeeper
namespace: governance_ds
@@ -24,8 +25,6 @@ governance:
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: true
-
-rules:
- !SHARDING
tables:
t_order: