You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2025/09/21 05:19:28 UTC
(shardingsphere) branch master updated: Rename props' key it.env.governance.center to it.cluster.regcenter (#36653)
This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 b4bdc7a28cd Rename props' key it.env.governance.center to it.cluster.regcenter (#36653)
b4bdc7a28cd is described below
commit b4bdc7a28cdec3bb954b50de1910238f714cfeb4
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Sep 21 13:19:21 2025 +0800
Rename props' key it.env.governance.center to it.cluster.regcenter (#36653)
---
.../test/e2e/env/runtime/E2ETestEnvironment.java | 3 ---
.../e2e/env/runtime/cluster/ClusterEnvironment.java | 3 +++
.../SQLE2EProxyContainerConfigurationFactory.java | 20 ++++++++++----------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
index 8b769c522eb..77238f474ca 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/E2ETestEnvironment.java
@@ -47,8 +47,6 @@ public final class E2ETestEnvironment {
private final Collection<String> scenarios;
- private final String governanceCenter;
-
private E2ETestEnvironment() {
Properties props = loadProperties();
TimeZone.setDefault(TimeZone.getTimeZone(props.getProperty("it.timezone", "UTC")));
@@ -56,7 +54,6 @@ public final class E2ETestEnvironment {
clusterEnvironment = new ClusterEnvironment(props);
nativeStorageEnvironment = new NativeStorageEnvironment(props);
scenarios = getScenarios(props);
- governanceCenter = props.getProperty("it.env.governance.center");
}
@SneakyThrows(IOException.class)
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/cluster/ClusterEnvironment.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/cluster/ClusterEnvironment.java
index 43e4b7a031e..bc125f60e30 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/cluster/ClusterEnvironment.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/cluster/ClusterEnvironment.java
@@ -41,6 +41,8 @@ public final class ClusterEnvironment {
private final Collection<String> adapters;
+ private final String regCenterType;
+
private final Collection<DatabaseType> databaseTypes;
private final Map<DatabaseType, String> databaseImages;
@@ -48,6 +50,7 @@ public final class ClusterEnvironment {
public ClusterEnvironment(final Properties props) {
type = getType(props);
adapters = getAdapters(props);
+ regCenterType = props.getProperty("it.cluster.regcenter");
databaseTypes = getDatabaseTypes(props);
databaseImages = getDatabaseImages(props);
}
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/config/SQLE2EProxyContainerConfigurationFactory.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/config/SQLE2EProxyContainerConfigurationFactory.java
index bed4272b1cc..403ddb22afb 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/config/SQLE2EProxyContainerConfigurationFactory.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/sql/env/container/config/SQLE2EProxyContainerConfigurationFactory.java
@@ -58,22 +58,22 @@ public final class SQLE2EProxyContainerConfigurationFactory {
}
private static String getGlobalYamlPath(final String scenario, final String modeType, final DatabaseType databaseType) {
- String governanceCenterType = getGovernanceCenterType(modeType);
- if (isDialectScenarioGlobalYamlExists(scenario, modeType, governanceCenterType, databaseType)) {
- return String.format("/env/scenario/%s/proxy/mode/%s/%s/%s/global.yaml", scenario, modeType, databaseType.getType().toLowerCase(), governanceCenterType);
+ String regCenterType = getRegistryCenterType(modeType);
+ if (isDialectScenarioGlobalYamlExists(scenario, modeType, regCenterType, databaseType)) {
+ return String.format("/env/scenario/%s/proxy/mode/%s/%s/%s/global.yaml", scenario, modeType, databaseType.getType().toLowerCase(), regCenterType);
}
- if (isGovernanceCenterGlobalYamlExists(scenario, modeType, governanceCenterType)) {
- return String.format("/env/scenario/%s/proxy/mode/%s/%s/global.yaml", scenario, modeType, governanceCenterType);
+ if (isGovernanceCenterGlobalYamlExists(scenario, modeType, regCenterType)) {
+ return String.format("/env/scenario/%s/proxy/mode/%s/%s/global.yaml", scenario, modeType, regCenterType);
}
- return String.format("/env/common/%s/proxy/conf/%s/global.yaml", modeType, governanceCenterType);
+ return String.format("/env/common/%s/proxy/conf/%s/global.yaml", modeType, regCenterType);
}
- private static String getGovernanceCenterType(final String modeType) {
- String governanceCenter = E2ETestEnvironment.getInstance().getGovernanceCenter();
- if (Strings.isNullOrEmpty(governanceCenter)) {
+ private static String getRegistryCenterType(final String modeType) {
+ String regCenterType = E2ETestEnvironment.getInstance().getClusterEnvironment().getRegCenterType();
+ if (Strings.isNullOrEmpty(regCenterType)) {
return "cluster".equals(modeType) ? "zookeeper" : "memory";
}
- return governanceCenter.toLowerCase();
+ return regCenterType.toLowerCase();
}
private static boolean isDialectScenarioGlobalYamlExists(final String scenario, final String modeType, final String governanceCenterType, final DatabaseType databaseType) {