You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/05/21 09:13:39 UTC
[shardingsphere] branch master updated: Remove useless codes for
RegistryCenter (#10423)
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 5bacfb1 Remove useless codes for RegistryCenter (#10423)
5bacfb1 is described below
commit 5bacfb16bfc14cbee4601054e597afd02fac7f82
Author: Liang Zhang <te...@163.com>
AuthorDate: Fri May 21 17:13:19 2021 +0800
Remove useless codes for RegistryCenter (#10423)
* Remove useless code
* Remove useless codes
---
.../governance/core/registry/RegistryCenter.java | 18 ------------------
.../governance/core/registry/RegistryCenterTest.java | 12 ------------
2 files changed, 30 deletions(-)
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
index e9e8180..6ccac67 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
@@ -421,24 +421,6 @@ public final class RegistryCenter {
}
/**
- * Persist instance data.
- *
- * @param instanceData instance data
- */
- public void persistInstanceData(final String instanceData) {
- repository.persist(node.getProxyNodePath(instanceId), instanceData);
- }
-
- /**
- * Load instance data.
- *
- * @return instance data
- */
- public String loadInstanceData() {
- return repository.get(node.getProxyNodePath(instanceId));
- }
-
- /**
* Load disabled data sources.
*
* @param schemaName schema name
diff --git a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterTest.java b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterTest.java
index e4489ae..52ad58c 100644
--- a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterTest.java
+++ b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/RegistryCenterTest.java
@@ -122,18 +122,6 @@ public final class RegistryCenterTest {
}
@Test
- public void assertPersistInstanceData() {
- registryCenter.persistInstanceData("test");
- verify(registryCenterRepository).persist(anyString(), eq("test"));
- }
-
- @Test
- public void assertLoadInstanceData() {
- registryCenter.loadInstanceData();
- verify(registryCenterRepository).get(anyString());
- }
-
- @Test
public void assertLoadDisabledDataSources() {
List<String> disabledDataSources = Collections.singletonList("replica_ds_0");
when(registryCenterRepository.getChildrenKeys(anyString())).thenReturn(disabledDataSources);