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 fb5414c Move package of ZookeeperProperties and EtcdProperties
(#10341)
fb5414c is described below
commit fb5414c11f0a664fbe191f9aacb11d139ce4ccf4
Author: Liang Zhang <[email protected]>
AuthorDate: Fri May 14 21:39:53 2021 +0800
Move package of ZookeeperProperties and EtcdProperties (#10341)
* Update CuratorZookeeperRepository
* Move package of ZookeeperProperties
* Move package of EtcdProperties
---
.../governance/repository/etcd/EtcdRepository.java | 2 ++
.../etcd/{ => props}/EtcdProperties.java | 2 +-
.../etcd/{ => props}/EtcdPropertyKey.java | 2 +-
.../repository/etcd/EtcdRepositoryTest.java | 1 +
.../etcd/{ => props}/EtcdPropertiesTest.java | 2 +-
.../zookeeper/CuratorZookeeperRepository.java | 31 ++++++++++++----------
.../zookeeper/{ => props}/ZookeeperProperties.java | 2 +-
.../{ => props}/ZookeeperPropertyKey.java | 2 +-
.../zookeeper/CuratorZookeeperRepositoryTest.java | 13 ++++-----
.../{ => props}/ZookeeperPropertiesTest.java | 2 +-
10 files changed, 33 insertions(+), 26 deletions(-)
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
index 248996f..4489c5d 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepository.java
@@ -30,6 +30,8 @@ import io.etcd.jetcd.watch.WatchEvent;
import lombok.Getter;
import lombok.Setter;
import lombok.SneakyThrows;
+import
org.apache.shardingsphere.governance.repository.etcd.props.EtcdProperties;
+import
org.apache.shardingsphere.governance.repository.etcd.props.EtcdPropertyKey;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdProperties.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdProperties.java
similarity index 94%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdProperties.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdProperties.java
index 7b1d61b..89aa90e 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdProperties.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdProperties.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.etcd;
+package org.apache.shardingsphere.governance.repository.etcd.props;
import org.apache.shardingsphere.infra.properties.TypedProperties;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertyKey.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdPropertyKey.java
similarity index 95%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertyKey.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdPropertyKey.java
index 985be82..197af63 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertyKey.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/main/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdPropertyKey.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.etcd;
+package org.apache.shardingsphere.governance.repository.etcd.props;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepositoryTest.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepositoryTest.java
index 9be09fd..b367fd8 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepositoryTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdRepositoryTest.java
@@ -33,6 +33,7 @@ import io.etcd.jetcd.watch.WatchEvent;
import io.etcd.jetcd.watch.WatchResponse;
import io.grpc.stub.StreamObserver;
import lombok.SneakyThrows;
+import
org.apache.shardingsphere.governance.repository.etcd.props.EtcdProperties;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertiesTest.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdProperti
[...]
similarity index 95%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertiesTest.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdPropertiesTest.java
index 5e239ed..619e563 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/EtcdPropertiesTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-etcd/src/test/java/org/apache/shardingsphere/governance/repository/etcd/props/EtcdPropertiesTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.etcd;
+package org.apache.shardingsphere.governance.repository.etcd.props;
import org.junit.Test;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/govern
[...]
index 20c087c..57f8e57 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepository.java
@@ -22,6 +22,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.CuratorFrameworkFactory.Builder;
import org.apache.curator.framework.api.ACLProvider;
import org.apache.curator.framework.recipes.cache.ChildData;
import org.apache.curator.framework.recipes.cache.CuratorCache;
@@ -30,12 +31,14 @@ import
org.apache.curator.framework.recipes.locks.InterProcessLock;
import org.apache.curator.framework.recipes.locks.InterProcessMutex;
import org.apache.curator.retry.ExponentialBackoffRetry;
import org.apache.curator.utils.CloseableUtils;
-import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.Type;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEventListener;
+import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import
org.apache.shardingsphere.governance.repository.zookeeper.handler.CuratorZookeeperExceptionHandler;
+import
org.apache.shardingsphere.governance.repository.zookeeper.props.ZookeeperProperties;
+import
org.apache.shardingsphere.governance.repository.zookeeper.props.ZookeeperPropertyKey;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException.OperationTimeoutException;
import org.apache.zookeeper.ZooDefs;
@@ -63,7 +66,7 @@ public final class CuratorZookeeperRepository implements
RegistryCenterRepositor
private CuratorFramework client;
- private CuratorFrameworkFactory.Builder builder =
CuratorFrameworkFactory.builder();
+ private final Builder builder = CuratorFrameworkFactory.builder();
private final Map<String, InterProcessLock> locks = new
ConcurrentHashMap<>();
@@ -73,16 +76,16 @@ public final class CuratorZookeeperRepository implements
RegistryCenterRepositor
@Override
public void init(final String name, final RegistryCenterConfiguration
config) {
- ZookeeperProperties zookeeperProperties = new
ZookeeperProperties(props);
- client = buildCuratorClient(name, config, zookeeperProperties);
- initCuratorClient(zookeeperProperties);
+ ZookeeperProperties zookeeperProps = new ZookeeperProperties(props);
+ client = buildCuratorClient(name, config, zookeeperProps);
+ initCuratorClient(zookeeperProps);
}
- private CuratorFramework buildCuratorClient(final String namespace, final
RegistryCenterConfiguration config, final ZookeeperProperties
zookeeperProperties) {
- int retryIntervalMilliseconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
- int maxRetries =
zookeeperProperties.getValue(ZookeeperPropertyKey.MAX_RETRIES);
- int timeToLiveSeconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS);
- int operationTimeoutMilliseconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS);
+ private CuratorFramework buildCuratorClient(final String namespace, final
RegistryCenterConfiguration config, final ZookeeperProperties zookeeperProps) {
+ int retryIntervalMilliseconds =
zookeeperProps.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
+ int maxRetries =
zookeeperProps.getValue(ZookeeperPropertyKey.MAX_RETRIES);
+ int timeToLiveSeconds =
zookeeperProps.getValue(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS);
+ int operationTimeoutMilliseconds =
zookeeperProps.getValue(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS);
builder.connectString(config.getServerLists())
.retryPolicy(new
ExponentialBackoffRetry(retryIntervalMilliseconds, maxRetries,
retryIntervalMilliseconds * maxRetries))
.namespace(namespace);
@@ -92,7 +95,7 @@ public final class CuratorZookeeperRepository implements
RegistryCenterRepositor
if (0 != operationTimeoutMilliseconds) {
builder.connectionTimeoutMs(operationTimeoutMilliseconds);
}
- String digest =
zookeeperProperties.getValue(ZookeeperPropertyKey.DIGEST);
+ String digest = zookeeperProps.getValue(ZookeeperPropertyKey.DIGEST);
if (!Strings.isNullOrEmpty(digest)) {
builder.authorization(ZookeeperPropertyKey.DIGEST.getKey(),
digest.getBytes(StandardCharsets.UTF_8))
.aclProvider(new ACLProvider() {
@@ -111,11 +114,11 @@ public final class CuratorZookeeperRepository implements
RegistryCenterRepositor
return builder.build();
}
- private void initCuratorClient(final ZookeeperProperties
zookeeperProperties) {
+ private void initCuratorClient(final ZookeeperProperties zookeeperProps) {
client.start();
try {
- int retryIntervalMilliseconds =
zookeeperProperties.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
- int maxRetries =
zookeeperProperties.getValue(ZookeeperPropertyKey.MAX_RETRIES);
+ int retryIntervalMilliseconds =
zookeeperProps.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
+ int maxRetries =
zookeeperProps.getValue(ZookeeperPropertyKey.MAX_RETRIES);
if (!client.blockUntilConnected(retryIntervalMilliseconds *
maxRetries, TimeUnit.MILLISECONDS)) {
client.close();
throw new OperationTimeoutException();
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperProperties.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/re
[...]
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperProperties.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperProperties.java
index 26a0a31..ec36b65 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperProperties.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperProperties.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.zookeeper;
+package org.apache.shardingsphere.governance.repository.zookeeper.props;
import org.apache.shardingsphere.infra.properties.TypedProperties;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertyKey.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/r
[...]
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertyKey.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperPropertyKey.java
index 46943d3..058ba9f 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertyKey.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperPropertyKey.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.zookeeper;
+package org.apache.shardingsphere.governance.repository.zookeeper.props;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/go
[...]
index 3eb5e90..f2ca574 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/CuratorZookeeperRepositoryTest.java
@@ -45,6 +45,7 @@ import
org.apache.curator.framework.state.ConnectionStateListener;
import
org.apache.shardingsphere.governance.repository.api.config.RegistryCenterConfiguration;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent;
import
org.apache.shardingsphere.governance.repository.api.listener.DataChangedEvent.Type;
+import
org.apache.shardingsphere.governance.repository.zookeeper.props.ZookeeperPropertyKey;
import org.apache.zookeeper.AddWatchMode;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.Watcher;
@@ -84,7 +85,7 @@ public final class CuratorZookeeperRepositoryTest {
private static final CuratorZookeeperRepository REPOSITORY = new
CuratorZookeeperRepository();
- private static String serverLists = "127.0.0.1:2181";
+ private static final String SERVER_LISTS = "127.0.0.1:2181";
@Mock
private Map<String, CuratorCache> caches;
@@ -137,7 +138,7 @@ public final class CuratorZookeeperRepositoryTest {
mockClient();
mockField();
mockBuilder();
- RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), SERVER_LISTS, new
Properties());
REPOSITORY.init("governance", config);
}
@@ -295,7 +296,7 @@ public final class CuratorZookeeperRepositoryTest {
props.setProperty(ZookeeperPropertyKey.MAX_RETRIES.getKey(), "1");
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(),
"1000");
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(),
"2000");
- RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), SERVER_LISTS, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS.getKey()),
is("1000"));
@@ -308,7 +309,7 @@ public final class CuratorZookeeperRepositoryTest {
public void assertBuildCuratorClientWithTimeToLiveSecondsEqualsZero() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(),
"0");
- RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), SERVER_LISTS, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey()),
is("0"));
@@ -318,7 +319,7 @@ public final class CuratorZookeeperRepositoryTest {
public void
assertBuildCuratorClientWithOperationTimeoutMillisecondsEqualsZero() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(),
"0");
- RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), SERVER_LISTS, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey()),
is("0"));
@@ -328,7 +329,7 @@ public final class CuratorZookeeperRepositoryTest {
public void assertBuildCuratorClientWithDigest() {
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.DIGEST.getKey(), "any");
- RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), serverLists, new
Properties());
+ RegistryCenterConfiguration config = new
RegistryCenterConfiguration(REPOSITORY.getType(), SERVER_LISTS, new
Properties());
REPOSITORY.setProps(props);
REPOSITORY.init("governance", config);
assertThat(REPOSITORY.getProps().getProperty(ZookeeperPropertyKey.DIGEST.getKey()),
is("any"));
diff --git
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertiesTest.java
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governanc
[...]
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertiesTest.java
rename to
shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperPropertiesTest.java
index 965db39..609fa00 100644
---
a/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/ZookeeperPropertiesTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-repository/shardingsphere-governance-repository-provider/shardingsphere-governance-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/governance/repository/zookeeper/props/ZookeeperPropertiesTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.repository.zookeeper;
+package org.apache.shardingsphere.governance.repository.zookeeper.props;
import org.junit.Test;