You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/05/09 11:49:28 UTC

[shardingsphere] branch master updated: Remove useless ShardingSphereServiceLoader.register reference in test cases (#17491)

This is an automated email from the ASF dual-hosted git repository.

panjuan 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 51e4c22a4c9 Remove useless ShardingSphereServiceLoader.register reference in test cases (#17491)
51e4c22a4c9 is described below

commit 51e4c22a4c962dc16c2ae683d3eaa3b9ec374ab6
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Mon May 9 19:49:18 2022 +0800

    Remove useless ShardingSphereServiceLoader.register reference in test cases (#17491)
    
    * Refactor StandalonePersistRepositoryFactoryTest
    
    * Refactor ClusterPersistRepositoryFactoryTest
---
 .../cluster/coordinator/ClusterPersistRepositoryFactoryTest.java    | 6 ------
 .../manager/standalone/StandalonePersistRepositoryFactoryTest.java  | 6 ------
 2 files changed, 12 deletions(-)

diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterPersistRepositoryFactoryTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterPersistRepositoryFactoryTest.java
index 1991571c189..1c565906186 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterPersistRepositoryFactoryTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-cluster-mode/shardingsphere-cluster-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/ClusterPersistRepositoryFactoryTest.java
@@ -17,11 +17,9 @@
 
 package org.apache.shardingsphere.mode.manager.cluster.coordinator;
 
-import org.apache.shardingsphere.mode.manager.cluster.coordinator.fixture.ClusterPersistRepositoryFixture;
 import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepository;
 import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryConfiguration;
 import org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryFactory;
-import org.apache.shardingsphere.spi.ShardingSphereServiceLoader;
 import org.junit.Test;
 
 import java.util.Properties;
@@ -31,10 +29,6 @@ import static org.junit.Assert.assertThat;
 
 public final class ClusterPersistRepositoryFactoryTest {
     
-    static {
-        ShardingSphereServiceLoader.register(ClusterPersistRepositoryFixture.class);
-    }
-    
     @Test
     public void assertNewInstance() {
         ClusterPersistRepositoryConfiguration config = new ClusterPersistRepositoryConfiguration("TEST", "", "", new Properties());
diff --git a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandalonePersistRepositoryFactoryTest.java b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandalonePersistRepositoryFactoryTest.java
index 4805c21d85e..09aa3e828d2 100644
--- a/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandalonePersistRepositoryFactoryTest.java
+++ b/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandalonePersistRepositoryFactoryTest.java
@@ -18,11 +18,9 @@
 package org.apache.shardingsphere.mode.manager.standalone;
 
 import org.apache.shardingsphere.infra.config.mode.PersistRepositoryConfiguration;
-import org.apache.shardingsphere.mode.manager.standalone.fixture.StandalonePersistRepositoryFixture;
 import org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository;
 import org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepositoryConfiguration;
 import org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepositoryFactory;
-import org.apache.shardingsphere.spi.ShardingSphereServiceLoader;
 import org.apache.shardingsphere.spi.exception.ServiceProviderNotFoundException;
 import org.junit.Test;
 
@@ -34,10 +32,6 @@ import static org.junit.Assert.assertThat;
 
 public final class StandalonePersistRepositoryFactoryTest {
     
-    static {
-        ShardingSphereServiceLoader.register(StandalonePersistRepositoryFixture.class);
-    }
-    
     @Test
     public void assertNewInstanceWithNoConfig() {
         StandalonePersistRepository standalonePersistRepository = StandalonePersistRepositoryFactory.newInstance(null);