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 2022/01/14 03:25:56 UTC
[shardingsphere] 01/01: Revert "Rename DataSourceProperties.getAllProperties() to getProperties (#14753)"
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch revert-14753-dev
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
commit 5ef2e9d2753e198b0ef1ed0a0333f9494a93e279
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Fri Jan 14 11:25:10 2022 +0800
Revert "Rename DataSourceProperties.getAllProperties() to getProperties (#14753)"
This reverts commit 4cd9a86d1a3392c2bde9dab36338d71f02b689d6.
---
...hardingRuleAlteredJobConfigurationPreparer.java | 2 +-
.../config/datasource/DataSourceProperties.java | 28 ++++++----
.../datasource/creator/DataSourcePoolCreator.java | 4 +-
.../YamlDataSourceConfigurationSwapper.java | 6 +--
.../infra/config/DataSourcePropertiesTest.java | 60 +++++++++++-----------
.../DataSourcePropertiesValidatorTest.java | 4 +-
.../creator/DataSourcePoolCreatorUtilTest.java | 14 ++---
.../impl/DefaultDataSourcePoolCreatorTest.java | 8 +--
.../impl/HikariDataSourcePoolCreatorTest.java | 18 +++----
.../YamlDataSourcePropertiesSwapperTest.java | 10 ++--
.../jdbc/core/connection/ConnectionManager.java | 4 +-
.../core/connection/ConnectionManagerTest.java | 6 +--
...dingSpherePipelineDataSourcePropertiesTest.java | 4 +-
.../mode/manager/ContextManagerTest.java | 2 +-
.../impl/DataSourceMetaDataPersistServiceTest.java | 8 +--
.../rdl/resource/ResourceSegmentsConverter.java | 8 +--
.../rql/resource/DataSourceQueryResultSet.java | 2 +-
.../resource/ResourceSegmentsConverterTest.java | 4 +-
.../distsql/rql/DataSourceQueryResultSetTest.java | 4 +-
.../ProxyResourceConfigurationConverter.java | 20 ++++----
...oxyProxyResourceConfigurationConverterTest.java | 2 +-
21 files changed, 114 insertions(+), 104 deletions(-)
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/schedule/ShardingRuleAlteredJobConfigurationPreparer.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/schedule/ShardingRuleAlteredJobConfigurationPreparer.java
index bfd4f6c..b6b319c 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/schedule/ShardingRuleAlteredJobConfigurationPreparer.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/main/java/org/apache/shardingsphere/sharding/schedule/ShardingRuleAlteredJobConfigurationPreparer.java
@@ -139,7 +139,7 @@ public final class ShardingRuleAlteredJobConfigurationPreparer implements RuleAl
tableMap.put(dataNode.getTableName(), each.getLogicTableName());
}
}
- DumperConfiguration dumperConfig = createDumperConfig(dataSourceName, dataSourcePropsMap.get(dataSourceName).getProperties(), tableMap);
+ DumperConfiguration dumperConfig = createDumperConfig(dataSourceName, dataSourcePropsMap.get(dataSourceName).getProps(), tableMap);
ImporterConfiguration importerConfig = createImporterConfig(pipelineConfig, handleConfig, shardingColumnsMap);
TaskConfiguration taskConfig = new TaskConfiguration(handleConfig, dumperConfig, importerConfig);
log.info("toTaskConfigs, dataSourceName={}, taskConfig={}", dataSourceName, taskConfig);
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/DataSourceProperties.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/DataSourceProperties.java
index fa1ebfe..a7d2f76 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/DataSourceProperties.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/DataSourceProperties.java
@@ -21,6 +21,7 @@ import com.google.common.base.Objects;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -36,7 +37,7 @@ public final class DataSourceProperties {
private final String dataSourceClassName;
- private final Map<String, Object> properties = new LinkedHashMap<>();
+ private final Map<String, Object> props = new LinkedHashMap<>();
/**
* Add property synonym to shared configuration.
@@ -45,14 +46,23 @@ public final class DataSourceProperties {
* @param synonym property synonym for configuration
*/
public void addPropertySynonym(final String originalName, final String synonym) {
- if (properties.containsKey(originalName)) {
- properties.put(synonym, properties.get(originalName));
+ if (props.containsKey(originalName)) {
+ props.put(synonym, props.get(originalName));
}
- if (properties.containsKey(synonym)) {
- properties.put(originalName, properties.get(synonym));
+ if (props.containsKey(synonym)) {
+ props.put(originalName, props.get(synonym));
}
}
+ /**
+ * Get all properties.
+ *
+ * @return all properties
+ */
+ public Map<String, Object> getAllProperties() {
+ return new HashMap<>(props);
+ }
+
@Override
public boolean equals(final Object obj) {
return this == obj || null != obj && getClass() == obj.getClass() && equalsByProperties((DataSourceProperties) obj);
@@ -62,11 +72,11 @@ public final class DataSourceProperties {
if (!dataSourceClassName.equals(dataSourceProperties.dataSourceClassName)) {
return false;
}
- for (Entry<String, Object> entry : properties.entrySet()) {
- if (!dataSourceProperties.properties.containsKey(entry.getKey())) {
+ for (Entry<String, Object> entry : props.entrySet()) {
+ if (!dataSourceProperties.props.containsKey(entry.getKey())) {
continue;
}
- if (!String.valueOf(entry.getValue()).equals(String.valueOf(dataSourceProperties.properties.get(entry.getKey())))) {
+ if (!String.valueOf(entry.getValue()).equals(String.valueOf(dataSourceProperties.props.get(entry.getKey())))) {
return false;
}
}
@@ -76,7 +86,7 @@ public final class DataSourceProperties {
@Override
public int hashCode() {
StringBuilder stringBuilder = new StringBuilder();
- for (Entry<String, Object> entry : properties.entrySet()) {
+ for (Entry<String, Object> entry : props.entrySet()) {
stringBuilder.append(entry.getKey()).append(entry.getValue());
}
return Objects.hashCode(dataSourceClassName, stringBuilder.toString());
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreator.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreator.java
index 8a0f3ff..13a326a 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreator.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreator.java
@@ -63,7 +63,7 @@ public final class DataSourcePoolCreator {
String propertyName = entry.getKey();
Object propertyValue = entry.getValue();
if (isValidProperty(propertyName, propertyValue)) {
- dataSourceProps.getProperties().put(propertyName, propertyValue);
+ dataSourceProps.getProps().put(propertyName, propertyValue);
}
}
}
@@ -102,7 +102,7 @@ public final class DataSourcePoolCreator {
}
private void setConfiguredFields(final DataSourceProperties dataSourceProps, final DataSourceReflection dataSourceReflection) {
- for (Entry<String, Object> entry : dataSourceProps.getProperties().entrySet()) {
+ for (Entry<String, Object> entry : dataSourceProps.getAllProperties().entrySet()) {
String fieldName = entry.getKey();
Object fieldValue = entry.getValue();
if (isValidProperty(fieldName, fieldValue)) {
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourceConfigurationSwapper.java b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourceConfigurationSwapper.java
index 11ffdce..9358cc1 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourceConfigurationSwapper.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourceConfigurationSwapper.java
@@ -71,9 +71,9 @@ public final class YamlDataSourceConfigurationSwapper {
Map<String, Object> newDataSourceMap = new HashMap<>(yamlConfig);
newDataSourceMap.remove(DATA_SOURCE_CLASS_NAME_KEY);
DataSourceProperties result = new DataSourceProperties(yamlConfig.get(DATA_SOURCE_CLASS_NAME_KEY).toString());
- result.getProperties().putAll(newDataSourceMap);
+ result.getProps().putAll(newDataSourceMap);
if (newDataSourceMap.containsKey(DataSourceProperties.CUSTOM_POOL_PROPS_KEY)) {
- result.getProperties().putAll((Map) newDataSourceMap.get(DataSourceProperties.CUSTOM_POOL_PROPS_KEY));
+ result.getProps().putAll((Map) newDataSourceMap.get(DataSourceProperties.CUSTOM_POOL_PROPS_KEY));
}
return result;
}
@@ -85,7 +85,7 @@ public final class YamlDataSourceConfigurationSwapper {
* @return data source map
*/
public Map<String, Object> swapToMap(final DataSourceProperties dataSourceProps) {
- Map<String, Object> result = new HashMap<>(dataSourceProps.getProperties());
+ Map<String, Object> result = new HashMap<>(dataSourceProps.getProps());
result.put(DATA_SOURCE_CLASS_NAME_KEY, dataSourceProps.getDataSourceClassName());
return result;
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/DataSourcePropertiesTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/DataSourcePropertiesTest.java
index cc7a442..8c6ea71 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/DataSourcePropertiesTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/DataSourcePropertiesTest.java
@@ -58,12 +58,12 @@ public final class DataSourcePropertiesTest {
actual.addPropertySynonym("url", "jdbcUrl");
actual.addPropertySynonym("user", "username");
assertThat(actual.getDataSourceClassName(), is(HikariDataSource.class.getName()));
- assertThat(actual.getProperties().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
- assertThat(actual.getProperties().get("jdbcUrl").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
- assertThat(actual.getProperties().get("username").toString(), is("root"));
- assertThat(actual.getProperties().get("password").toString(), is("root"));
- assertThat(actual.getProperties().get("jdbcUrl"), is(actual.getProperties().get("url")));
- assertThat(actual.getProperties().get("username"), is(actual.getProperties().get("user")));
+ assertThat(actual.getProps().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
+ assertThat(actual.getProps().get("jdbcUrl").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
+ assertThat(actual.getProps().get("username").toString(), is("root"));
+ assertThat(actual.getProps().get("password").toString(), is("root"));
+ assertThat(actual.getProps().get("jdbcUrl"), is(actual.getProps().get("url")));
+ assertThat(actual.getProps().get("username"), is(actual.getProps().get("user")));
}
@Test
@@ -72,10 +72,10 @@ public final class DataSourcePropertiesTest {
DataSourceProperties targetDataSourceProps = new DataSourceProperties("FooDataSourceClass");
assertThat(originalDataSourceProps, is(originalDataSourceProps));
assertThat(originalDataSourceProps, is(targetDataSourceProps));
- originalDataSourceProps.getProperties().put("username", "root");
- targetDataSourceProps.getProperties().put("username", "root");
+ originalDataSourceProps.getProps().put("username", "root");
+ targetDataSourceProps.getProps().put("username", "root");
assertThat(originalDataSourceProps, is(targetDataSourceProps));
- targetDataSourceProps.getProperties().put("password", "root");
+ targetDataSourceProps.getProps().put("password", "root");
assertThat(originalDataSourceProps, is(targetDataSourceProps));
}
@@ -93,8 +93,8 @@ public final class DataSourcePropertiesTest {
public void assertNotEqualsWithDifferentProperties() {
DataSourceProperties originalDataSourceProps = new DataSourceProperties("FooDataSourceClass");
DataSourceProperties targetDataSourceProps = new DataSourceProperties("FooDataSourceClass");
- originalDataSourceProps.getProperties().put("username", "root");
- targetDataSourceProps.getProperties().put("username", "root0");
+ originalDataSourceProps.getProps().put("username", "root");
+ targetDataSourceProps.getProps().put("username", "root0");
assertThat(originalDataSourceProps, not(targetDataSourceProps));
}
@@ -103,11 +103,11 @@ public final class DataSourcePropertiesTest {
DataSourceProperties originalDataSourceProps = new DataSourceProperties("FooDataSourceClass");
DataSourceProperties targetDataSourceProps = new DataSourceProperties("FooDataSourceClass");
assertThat(originalDataSourceProps.hashCode(), is(targetDataSourceProps.hashCode()));
- originalDataSourceProps.getProperties().put("username", "root");
- targetDataSourceProps.getProperties().put("username", "root");
+ originalDataSourceProps.getProps().put("username", "root");
+ targetDataSourceProps.getProps().put("username", "root");
assertThat(originalDataSourceProps.hashCode(), is(targetDataSourceProps.hashCode()));
- originalDataSourceProps.getProperties().put("password", "root");
- targetDataSourceProps.getProperties().put("password", "root");
+ originalDataSourceProps.getProps().put("password", "root");
+ targetDataSourceProps.getProps().put("password", "root");
assertThat(originalDataSourceProps.hashCode(), is(targetDataSourceProps.hashCode()));
}
@@ -115,9 +115,9 @@ public final class DataSourcePropertiesTest {
public void assertDifferentHashCode() {
DataSourceProperties originalDataSourceProps = new DataSourceProperties("FooDataSourceClass");
DataSourceProperties targetDataSourceProps = new DataSourceProperties("FooDataSourceClass");
- originalDataSourceProps.getProperties().put("username", "root");
- targetDataSourceProps.getProperties().put("username", "root");
- targetDataSourceProps.getProperties().put("password", "root");
+ originalDataSourceProps.getProps().put("username", "root");
+ targetDataSourceProps.getProps().put("username", "root");
+ targetDataSourceProps.getProps().put("password", "root");
assertThat(originalDataSourceProps.hashCode(), not(targetDataSourceProps.hashCode()));
originalDataSourceProps = new DataSourceProperties("FooDataSourceClass");
targetDataSourceProps = new DataSourceProperties("BarDataSourceClass");
@@ -135,13 +135,13 @@ public final class DataSourcePropertiesTest {
actualDataSource.setConnectionInitSqls(Arrays.asList("set names utf8mb4;", "set names utf8;"));
DataSourceProperties actual = DataSourcePoolCreatorUtil.getDataSourceConfiguration(actualDataSource);
assertThat(actual.getDataSourceClassName(), is(BasicDataSource.class.getName()));
- assertThat(actual.getProperties().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
- assertThat(actual.getProperties().get("url").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
- assertThat(actual.getProperties().get("username").toString(), is("root"));
- assertThat(actual.getProperties().get("password").toString(), is("root"));
- assertNull(actual.getProperties().get("loginTimeout"));
- assertThat(actual.getProperties().get("connectionInitSqls"), instanceOf(List.class));
- List<String> actualConnectionInitSql = (List<String>) actual.getProperties().get("connectionInitSqls");
+ assertThat(actual.getProps().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
+ assertThat(actual.getProps().get("url").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
+ assertThat(actual.getProps().get("username").toString(), is("root"));
+ assertThat(actual.getProps().get("password").toString(), is("root"));
+ assertNull(actual.getProps().get("loginTimeout"));
+ assertThat(actual.getProps().get("connectionInitSqls"), instanceOf(List.class));
+ List<String> actualConnectionInitSql = (List<String>) actual.getProps().get("connectionInitSqls");
assertThat(actualConnectionInitSql, hasItem("set names utf8mb4;"));
assertThat(actualConnectionInitSql, hasItem("set names utf8;"));
}
@@ -159,8 +159,8 @@ public final class DataSourcePropertiesTest {
customPoolProps.setProperty("maximumPoolSize", "30");
customPoolProps.setProperty("idleTimeout", "30000");
DataSourceProperties dataSourceProps = new DataSourceProperties(HikariDataSource.class.getName());
- dataSourceProps.getProperties().putAll(props);
- dataSourceProps.getProperties().putAll(new HashMap(customPoolProps));
+ dataSourceProps.getProps().putAll(props);
+ dataSourceProps.getProps().putAll(new HashMap(customPoolProps));
HikariDataSource actual = (HikariDataSource) DataSourcePoolCreatorUtil.getDataSource(dataSourceProps);
assertThat(actual.getDriverClassName(), is(MockedDataSource.class.getCanonicalName()));
assertThat(actual.getJdbcUrl(), is("jdbc:mock://127.0.0.1/foo_ds"));
@@ -182,9 +182,9 @@ public final class DataSourcePropertiesTest {
customPoolProps.setProperty("maximumPoolSize", "30");
customPoolProps.setProperty("idleTimeout", "30000");
DataSourceProperties originalDataSourceProps = new DataSourceProperties("FooDataSourceClass");
- originalDataSourceProps.getProperties().putAll(props);
- originalDataSourceProps.getProperties().putAll(new HashMap(customPoolProps));
- Map<String, Object> actualAllProperties = originalDataSourceProps.getProperties();
+ originalDataSourceProps.getProps().putAll(props);
+ originalDataSourceProps.getProps().putAll(new HashMap(customPoolProps));
+ Map<String, Object> actualAllProperties = originalDataSourceProps.getAllProperties();
assertNotNull(actualAllProperties);
assertThat(actualAllProperties.size(), is(7));
assertTrue(actualAllProperties.containsKey("driverClassName"));
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/DataSourcePropertiesValidatorTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/DataSourcePropertiesValidatorTest.java
index ba64899..68a7a10 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/DataSourcePropertiesValidatorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/DataSourcePropertiesValidatorTest.java
@@ -41,7 +41,7 @@ public final class DataSourcePropertiesValidatorTest {
props.put("username", "root");
props.put("password", "root");
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getName());
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
@@ -55,7 +55,7 @@ public final class DataSourcePropertiesValidatorTest {
Map<String, Object> props = new HashMap<>();
props.put("driverClassName", "InvalidDriver");
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getName());
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreatorUtilTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreatorUtilTest.java
index cbecb4b..99fbe6a 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreatorUtilTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/DataSourcePoolCreatorUtilTest.java
@@ -62,11 +62,11 @@ public final class DataSourcePoolCreatorUtilTest {
actualDataSource.setLoginTimeout(1);
DataSourceProperties actual = DataSourcePoolCreatorUtil.getDataSourceConfiguration(actualDataSource);
assertThat(actual.getDataSourceClassName(), is(HikariDataSource.class.getName()));
- assertThat(actual.getProperties().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
- assertThat(actual.getProperties().get("jdbcUrl").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
- assertThat(actual.getProperties().get("username").toString(), is("root"));
- assertThat(actual.getProperties().get("password").toString(), is("root"));
- assertNull(actual.getProperties().get("loginTimeout"));
+ assertThat(actual.getProps().get("driverClassName").toString(), is(MockedDataSource.class.getCanonicalName()));
+ assertThat(actual.getProps().get("jdbcUrl").toString(), is("jdbc:mock://127.0.0.1/foo_ds"));
+ assertThat(actual.getProps().get("username").toString(), is("root"));
+ assertThat(actual.getProps().get("password").toString(), is("root"));
+ assertNull(actual.getProps().get("loginTimeout"));
}
@Test
@@ -90,7 +90,7 @@ public final class DataSourcePoolCreatorUtilTest {
props.put("password", 123);
props.put("loginTimeout", "5000");
DataSourceProperties dataSourceProps = new DataSourceProperties(HikariDataSource.class.getName());
- dataSourceProps.getProperties().putAll(props);
+ dataSourceProps.getProps().putAll(props);
HikariDataSource actual = (HikariDataSource) DataSourcePoolCreatorUtil.getDataSource(dataSourceProps);
assertThat(actual.getDriverClassName(), is(MockedDataSource.class.getCanonicalName()));
assertThat(actual.getJdbcUrl(), is("jdbc:mock://127.0.0.1/foo_ds"));
@@ -126,7 +126,7 @@ public final class DataSourcePoolCreatorUtilTest {
props.put("maxLifetime", "60000");
props.put("test", "test");
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getName());
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/DefaultDataSourcePoolCreatorTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/DefaultDataSourcePoolCreatorTest.java
index fe63c52..41ab478 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/DefaultDataSourcePoolCreatorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/DefaultDataSourcePoolCreatorTest.java
@@ -54,10 +54,10 @@ public final class DefaultDataSourcePoolCreatorTest {
private DataSourceProperties createDataSourceProperties() {
DataSourceProperties result = new DataSourceProperties(MockedDataSource.class.getCanonicalName());
- result.getProperties().put("driverClassName", "org.h2.Driver");
- result.getProperties().put("url", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL");
- result.getProperties().put("username", "root");
- result.getProperties().put("password", "root");
+ result.getProps().put("driverClassName", "org.h2.Driver");
+ result.getProps().put("url", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL");
+ result.getProps().put("username", "root");
+ result.getProps().put("password", "root");
return result;
}
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/HikariDataSourcePoolCreatorTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/HikariDataSourcePoolCreatorTest.java
index 99072f1..2d8db8a 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/HikariDataSourcePoolCreatorTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/config/datasource/creator/impl/HikariDataSourcePoolCreatorTest.java
@@ -42,7 +42,7 @@ public final class HikariDataSourcePoolCreatorTest {
dataSource.setUsername("root");
dataSource.setPassword("root");
DataSourceProperties dataSourceProps = new DataSourcePoolCreator(HikariDataSource.class.getCanonicalName()).createDataSourceProperties(dataSource);
- Map<String, Object> props = dataSourceProps.getProperties();
+ Map<String, Object> props = dataSourceProps.getProps();
assertFalse(props.containsKey("driverClassName") && null == props.get("driverClassName"));
}
@@ -51,13 +51,13 @@ public final class HikariDataSourcePoolCreatorTest {
DataSourcePoolCreator dataSourcePoolCreator = new DataSourcePoolCreator(HikariDataSource.class.getCanonicalName());
DataSourceProperties dataSourceProps = dataSourcePoolCreator.createDataSourceProperties(dataSourcePoolCreator.createDataSource(createDataSourceProperties()));
assertThat(dataSourceProps.getDataSourceClassName(), is("com.zaxxer.hikari.HikariDataSource"));
- assertThat(dataSourceProps.getProperties().get("jdbcUrl"), is("jdbc:mysql://127.0.0.1/foo_ds"));
- assertThat(dataSourceProps.getProperties().get("driverClassName"), is(MockedDataSource.class.getCanonicalName()));
- assertThat(dataSourceProps.getProperties().get("username"), is("root"));
- assertThat(dataSourceProps.getProperties().get("password"), is("root"));
- assertThat(dataSourceProps.getProperties().get("maximumPoolSize"), is(10));
- assertThat(dataSourceProps.getProperties().get("minimumIdle"), is(1));
- assertDataSourceProperties((Properties) dataSourceProps.getProperties().get("dataSourceProperties"));
+ assertThat(dataSourceProps.getProps().get("jdbcUrl"), is("jdbc:mysql://127.0.0.1/foo_ds"));
+ assertThat(dataSourceProps.getProps().get("driverClassName"), is(MockedDataSource.class.getCanonicalName()));
+ assertThat(dataSourceProps.getProps().get("username"), is("root"));
+ assertThat(dataSourceProps.getProps().get("password"), is("root"));
+ assertThat(dataSourceProps.getProps().get("maximumPoolSize"), is(10));
+ assertThat(dataSourceProps.getProps().get("minimumIdle"), is(1));
+ assertDataSourceProperties((Properties) dataSourceProps.getProps().get("dataSourceProperties"));
}
@Test
@@ -85,7 +85,7 @@ public final class HikariDataSourcePoolCreatorTest {
props.put("minPoolSize", 1);
props.put("dataSourceProperties", getDataSourceProperties());
DataSourceProperties result = new DataSourceProperties("com.zaxxer.hikari.HikariDataSource");
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
diff --git a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourcePropertiesSwapperTest.java b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourcePropertiesSwapperTest.java
index de6325b..4f85a2f 100644
--- a/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourcePropertiesSwapperTest.java
+++ b/shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/yaml/config/swapper/YamlDataSourcePropertiesSwapperTest.java
@@ -58,16 +58,16 @@ public final class YamlDataSourcePropertiesSwapperTest {
yamlConfig.put("username", "root");
DataSourceProperties actual = swapper.swapToDataSourceProperties(yamlConfig);
assertThat(actual.getDataSourceClassName(), is(MockedDataSource.class.getCanonicalName()));
- assertThat(actual.getProperties().size(), is(2));
- assertThat(actual.getProperties().get("url").toString(), is("xx:xxx"));
- assertThat(actual.getProperties().get("username").toString(), is("root"));
+ assertThat(actual.getProps().size(), is(2));
+ assertThat(actual.getProps().get("url").toString(), is("xx:xxx"));
+ assertThat(actual.getProps().get("username").toString(), is("root"));
}
@Test
public void assertSwapToMap() {
DataSourceProperties dataSourceProps = new DataSourceProperties(MockedDataSource.class.getCanonicalName());
- dataSourceProps.getProperties().put("url", "xx:xxx");
- dataSourceProps.getProperties().put("username", "root");
+ dataSourceProps.getProps().put("url", "xx:xxx");
+ dataSourceProps.getProps().put("username", "root");
Map<String, Object> actual = swapper.swapToMap(dataSourceProps);
assertThat(actual.get("dataSourceClassName"), is(MockedDataSource.class.getCanonicalName()));
assertThat(actual.get("url").toString(), is("xx:xxx"));
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManager.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManager.java
index 0e9bde4..03c6537 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManager.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManager.java
@@ -111,13 +111,13 @@ public final class ConnectionManager implements ExecutorJDBCManager, AutoCloseab
private DataSourceProperties createDataSourceProperties(final ComputeNodeInstance instance, final Collection<ShardingSphereUser> users,
final DataSourceProperties dataSourcePropsSample, final String schema) {
- Map<String, Object> props = dataSourcePropsSample.getProperties();
+ Map<String, Object> props = dataSourcePropsSample.getProps();
props.put("jdbcUrl", createJdbcUrl(instance, schema, props));
ShardingSphereUser user = users.iterator().next();
props.put("username", user.getGrantee().getUsername());
props.put("password", user.getPassword());
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getName());
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManagerTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManagerTest.java
index 44353b9..a4550bb 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManagerTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-core/src/test/java/org/apache/shardingsphere/driver/jdbc/core/connection/ConnectionManagerTest.java
@@ -105,9 +105,9 @@ public final class ConnectionManagerTest {
Map<String, DataSourceProperties> result = new LinkedHashMap<>();
DataSourceProperties dataSourceProps = new DataSourceProperties(HikariDataSource.class.getName());
result.put(DefaultSchema.LOGIC_NAME, dataSourceProps);
- dataSourceProps.getProperties().put("jdbcUrl", "jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false");
- dataSourceProps.getProperties().put("username", "root");
- dataSourceProps.getProperties().put("password", "123456");
+ dataSourceProps.getProps().put("jdbcUrl", "jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false");
+ dataSourceProps.getProps().put("username", "root");
+ dataSourceProps.getProps().put("password", "123456");
return result;
}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/infra/config/datasource/config/impl/ShardingSpherePipelineDataSourcePropertiesTest.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/infra/config/datasource/config/impl/ShardingSpherePipelineDataSourcePropertiesTest.java
index bdc83fd..fb65a8a 100644
--- a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/infra/config/datasource/config/impl/ShardingSpherePipelineDataSourcePropertiesTest.java
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-core/src/test/java/org/apache/shardingsphere/infra/config/datasource/config/impl/ShardingSpherePipelineDataSourcePropertiesTest.java
@@ -40,8 +40,8 @@ public final class ShardingSpherePipelineDataSourcePropertiesTest {
queryProps.setProperty("rewriteBatchedStatements", Boolean.TRUE.toString());
dataSourceConfig.appendJDBCQueryProperties(queryProps);
List<DataSourceProperties> actual = new ArrayList<>(getDataSourcePropertiesMap(dataSourceConfig.getRootConfig().getDataSources()).values());
- assertThat(actual.get(0).getProperties().get("url"), is("jdbc:mysql://192.168.0.2:3306/scaling?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true"));
- assertThat(actual.get(1).getProperties().get("url"), is("jdbc:mysql://192.168.0.1:3306/scaling?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true"));
+ assertThat(actual.get(0).getProps().get("url"), is("jdbc:mysql://192.168.0.2:3306/scaling?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true"));
+ assertThat(actual.get(1).getProps().get("url"), is("jdbc:mysql://192.168.0.1:3306/scaling?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true"));
}
private String getDataSourceYaml() {
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
index c1555ec..437bad4 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/ContextManagerTest.java
@@ -448,7 +448,7 @@ public final class ContextManagerTest {
props.putIfAbsent("username", "root");
props.putIfAbsent("password", "root");
DataSourceProperties result = new DataSourceProperties(MockedDataSource.class.getCanonicalName());
- result.getProperties().putAll(props);
+ result.getProps().putAll(props);
return result;
}
diff --git a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/service/impl/DataSourceMetaDataPersistServiceTest.java b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/service/impl/DataSourceMetaDataPersistServiceTest.java
index d76185c..441b1a2 100644
--- a/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/service/impl/DataSourceMetaDataPersistServiceTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/persist/service/impl/DataSourceMetaDataPersistServiceTest.java
@@ -67,10 +67,10 @@ public final class DataSourceMetaDataPersistServiceTest {
private void assertDataSourceProperties(final DataSourceProperties actual, final DataSourceProperties expected) {
assertThat(actual.getDataSourceClassName(), is(expected.getDataSourceClassName()));
- assertThat(actual.getProperties().get("url"), is(expected.getProperties().get("url")));
- assertThat(actual.getProperties().get("username"), is(expected.getProperties().get("username")));
- assertThat(actual.getProperties().get("password"), is(expected.getProperties().get("password")));
- assertThat(actual.getProperties().get("connectionInitSqls"), is(expected.getProperties().get("connectionInitSqls")));
+ assertThat(actual.getProps().get("url"), is(expected.getProps().get("url")));
+ assertThat(actual.getProps().get("username"), is(expected.getProps().get("username")));
+ assertThat(actual.getProps().get("password"), is(expected.getProps().get("password")));
+ assertThat(actual.getProps().get("connectionInitSqls"), is(expected.getProps().get("connectionInitSqls")));
}
@Test
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverter.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverter.java
index 10962fc..643642d 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverter.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverter.java
@@ -52,10 +52,10 @@ public final class ResourceSegmentsConverter {
@SuppressWarnings({"unchecked", "rawtypes"})
private static DataSourceProperties createDataSourceProperties(final DatabaseType databaseType, final DataSourceSegment segment) {
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getCanonicalName());
- result.getProperties().put("jdbcUrl", getURL(databaseType, segment));
- result.getProperties().put("username", segment.getUser());
- result.getProperties().put("password", segment.getPassword());
- result.getProperties().putAll((Map) segment.getProperties());
+ result.getProps().put("jdbcUrl", getURL(databaseType, segment));
+ result.getProps().put("username", segment.getUser());
+ result.getProps().put("password", segment.getPassword());
+ result.getProps().putAll((Map) segment.getProperties());
return result;
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
index 0523bd1..0404e96 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/resource/DataSourceQueryResultSet.java
@@ -78,7 +78,7 @@ public final class DataSourceQueryResultSet implements DistSQLResultSet {
private Map<String, Object> getAttributeMap(final DataSourceProperties dataSourceProps) {
Map<String, Object> result = new LinkedHashMap<>(7, 1);
- for (Entry<String, Object> entry : dataSourceProps.getProperties().entrySet()) {
+ for (Entry<String, Object> entry : dataSourceProps.getProps().entrySet()) {
// TODO process synonym
String key = entry.getKey();
// TODO skip url, user and password from DataSourceProperties
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverterTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverterTest.java
index 04f1ebc..310deff 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverterTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverterTest.java
@@ -39,8 +39,8 @@ public final class ResourceSegmentsConverterTest {
Map<String, DataSourceProperties> actual = ResourceSegmentsConverter.convert(new MySQLDatabaseType(), createDataSourceSegments());
assertThat(actual.size(), is(2));
assertTrue(actual.keySet().containsAll(Arrays.asList("ds0", "ds1")));
- assertThat(actual.values().iterator().next().getProperties().get("username"), is("root0"));
- assertThat(actual.values().iterator().next().getProperties().get("maxPoolSize"), is("30"));
+ assertThat(actual.values().iterator().next().getProps().get("username"), is("root0"));
+ assertThat(actual.values().iterator().next().getProps().get("maxPoolSize"), is("30"));
}
private Collection<DataSourceSegment> createDataSourceSegments() {
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/DataSourceQueryResultSetTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/DataSourceQueryResultSetTest.java
index 189b079..47b160b 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/DataSourceQueryResultSetTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rql/DataSourceQueryResultSetTest.java
@@ -127,8 +127,8 @@ public final class DataSourceQueryResultSetTest {
private Map<String, DataSourceProperties> createDataSourcePropertiesMap() {
Map<String, DataSourceProperties> result = new HashMap<>();
DataSourceProperties ds0 = new DataSourceProperties("ds_0");
- ds0.getProperties().put("test", "test");
- ds0.getProperties().put("readOnly", true);
+ ds0.getProps().put("test", "test");
+ ds0.getProps().put("readOnly", true);
result.put("ds_0", ds0);
return result;
}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/resource/ProxyResourceConfigurationConverter.java b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/resource/ProxyResourceConfigurationConverter.java
index 1470b1d..270b46d 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/resource/ProxyResourceConfigurationConverter.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/resource/ProxyResourceConfigurationConverter.java
@@ -66,18 +66,18 @@ public final class ProxyResourceConfigurationConverter {
private static DataSourceProperties createDataSourceConfiguration(final ProxyResourceConfiguration resourceConfig) {
DataSourceProperties result = new DataSourceProperties(HikariDataSource.class.getName());
- result.getProperties().put("jdbcUrl", resourceConfig.getConnection().getUrl());
- result.getProperties().put("username", resourceConfig.getConnection().getUsername());
- result.getProperties().put("password", resourceConfig.getConnection().getPassword());
- result.getProperties().put("connectionTimeout", resourceConfig.getPool().getConnectionTimeoutMilliseconds());
- result.getProperties().put("idleTimeout", resourceConfig.getPool().getIdleTimeoutMilliseconds());
- result.getProperties().put("maxLifetime", resourceConfig.getPool().getMaxLifetimeMilliseconds());
- result.getProperties().put("maximumPoolSize", resourceConfig.getPool().getMaxPoolSize());
- result.getProperties().put("minimumIdle", resourceConfig.getPool().getMinPoolSize());
- result.getProperties().put("readOnly", resourceConfig.getPool().getReadOnly());
+ result.getProps().put("jdbcUrl", resourceConfig.getConnection().getUrl());
+ result.getProps().put("username", resourceConfig.getConnection().getUsername());
+ result.getProps().put("password", resourceConfig.getConnection().getPassword());
+ result.getProps().put("connectionTimeout", resourceConfig.getPool().getConnectionTimeoutMilliseconds());
+ result.getProps().put("idleTimeout", resourceConfig.getPool().getIdleTimeoutMilliseconds());
+ result.getProps().put("maxLifetime", resourceConfig.getPool().getMaxLifetimeMilliseconds());
+ result.getProps().put("maximumPoolSize", resourceConfig.getPool().getMaxPoolSize());
+ result.getProps().put("minimumIdle", resourceConfig.getPool().getMinPoolSize());
+ result.getProps().put("readOnly", resourceConfig.getPool().getReadOnly());
if (null != resourceConfig.getPool().getCustomProperties()) {
for (Entry<Object, Object> entry : resourceConfig.getPool().getCustomProperties().entrySet()) {
- result.getProperties().put(entry.getKey().toString(), entry.getValue());
+ result.getProps().put(entry.getKey().toString(), entry.getValue());
}
}
return result;
diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/config/resource/ProxyProxyResourceConfigurationConverterTest.java b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/config/resource/ProxyProxyResourceConfigurationConverterTest.java
index f863986..f854fee 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/config/resource/ProxyProxyResourceConfigurationConverterTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/test/java/org/apache/shardingsphere/proxy/config/resource/ProxyProxyResourceConfigurationConverterTest.java
@@ -49,7 +49,7 @@ public final class ProxyProxyResourceConfigurationConverterTest {
}
private void assertParameter(final DataSourceProperties actual) {
- Map<String, Object> props = actual.getProperties();
+ Map<String, Object> props = actual.getProps();
assertThat(props.size(), is(9));
assertThat(props.get("jdbcUrl"), is("jdbc:mysql://localhost:3306/demo_ds"));
assertThat(props.get("username"), is("root"));