You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/05/05 06:50:55 UTC

[shardingsphere] branch master updated: Refactor algorithm fixtures (#17330)

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

jianglongtao 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 98e3662a3ad Refactor algorithm fixtures  (#17330)
98e3662a3ad is described below

commit 98e3662a3ad7caed6bd7f9090bb61c47bdc48413
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Thu May 5 14:50:42 2022 +0800

    Refactor algorithm fixtures  (#17330)
    
    * Remove useless fixture in rewrite-test module
    
    * Remove useless fixture in rewrite-test module
    
    * Rename SpringComplexKeysShardingAlgorithmFixture
    
    * Rename type of ComplexKeysShardingAlgorithmFixture
    
    * Rename DriverComplexKeysShardingAlgorithmFixture
---
 .../ComplexKeysShardingAlgorithmFixture.java       |  2 +-
 .../sharding/rule/ShardingRuleTest.java            |  2 +-
 .../src/test/resources/yaml/sharding-rule.yaml     |  2 +-
 .../namespace/ShardingSpringNamespaceTest.java     |  2 +-
 ...SpringComplexKeysShardingAlgorithmFixture.java} |  4 +-
 ...e.shardingsphere.sharding.spi.ShardingAlgorithm |  2 +-
 .../spring/sharding-application-context.xml        |  2 +-
 ...DriverComplexKeysShardingAlgorithmFixture.java} |  6 +--
 ...e.shardingsphere.sharding.spi.ShardingAlgorithm |  2 +-
 .../sharding/configWithDataSourceWithProps.yaml    |  2 +-
 .../sharding/configWithDataSourceWithoutProps.yaml |  2 +-
 .../configWithoutDataSourceWithoutProps.yaml       |  2 +-
 .../configWithDataSourceWithProps.yaml             |  2 +-
 .../configWithDataSourceWithoutProps.yaml          |  2 +-
 .../configWithoutDataSourceWithProps.yaml          |  2 +-
 .../configWithoutDataSourceWithoutProps.yaml       |  2 +-
 .../ComplexKeysShardingAlgorithmFixture.java       | 36 --------------
 .../fixture/StandardShardingAlgorithmFixture.java  | 56 ----------------------
 ...e.shardingsphere.sharding.spi.ShardingAlgorithm | 19 --------
 19 files changed, 19 insertions(+), 130 deletions(-)

diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/fixture/ComplexKeysShardingAlgorithmFixture.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/fixture/ComplexKeysShardingAlgorithmFixture.java
index 879c3f6375b..f350b501882 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/fixture/ComplexKeysShardingAlgorithmFixture.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/fixture/ComplexKeysShardingAlgorithmFixture.java
@@ -31,6 +31,6 @@ public final class ComplexKeysShardingAlgorithmFixture implements ComplexKeysSha
     
     @Override
     public String getType() {
-        return "COMPLEX_TEST";
+        return "COMPLEX.FIXTURE";
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
index c0a8339640d..f5da4c50fa4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/java/org/apache/shardingsphere/sharding/rule/ShardingRuleTest.java
@@ -538,7 +538,7 @@ public final class ShardingRuleTest {
     
     private ShardingTableRuleConfiguration createTableRuleConfigWithComplexStrategies() {
         ShardingTableRuleConfiguration result = new ShardingTableRuleConfiguration("LOGIC_TABLE", "ds_${0..1}.table_${0..2}");
-        result.setDatabaseShardingStrategy(new ComplexShardingStrategyConfiguration("COLUMN1,COLUMN2", "COMPLEX_TEST"));
+        result.setDatabaseShardingStrategy(new ComplexShardingStrategyConfiguration("COLUMN1,COLUMN2", "COMPLEX.FIXTURE"));
         result.setTableShardingStrategy(new NoneShardingStrategyConfiguration());
         return result;
     }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/resources/yaml/sharding-rule.yaml b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/resources/yaml/sharding-rule.yaml
index cffa1093bb5..4ed5679bcf4 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/resources/yaml/sharding-rule.yaml
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-core/src/test/resources/yaml/sharding-rule.yaml
@@ -75,7 +75,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: COMPLEX.FIXTURE
     hint_test:
       type: HINT.FIXTURE
     database_inline:
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/ShardingSpringNamespaceTest.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/ShardingSpringNamespaceTest.java
index 52079892d9b..0ac9f389ba7 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/ShardingSpringNamespaceTest.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/ShardingSpringNamespaceTest.java
@@ -128,7 +128,7 @@ public final class ShardingSpringNamespaceTest extends AbstractJUnit4SpringConte
     
     @Test
     public void assertComplexShardingAlgorithm() {
-        assertThat(complexShardingAlgorithm.getType(), is("COMPLEX_TEST"));
+        assertThat(complexShardingAlgorithm.getType(), is("SPRING.COMPLEX.FIXTURE"));
     }
     
     @Test
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/ComplexKeysShardingAlgorithmFixture.java b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/SpringComplexKeysShardingAlgori [...]
similarity index 89%
rename from shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/ComplexKeysShardingAlgorithmFixture.java
rename to shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/SpringComplexKeysShardingAlgorithmFixture.java
index 9efb5cd5a8d..5647cf9add2 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/ComplexKeysShardingAlgorithmFixture.java
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/java/org/apache/shardingsphere/sharding/spring/namespace/fixture/sharding/SpringComplexKeysShardingAlgorithmFixture.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardi
 
 import java.util.Collection;
 
-public final class ComplexKeysShardingAlgorithmFixture implements ComplexKeysShardingAlgorithm<Integer> {
+public final class SpringComplexKeysShardingAlgorithmFixture implements ComplexKeysShardingAlgorithm<Integer> {
     
     @Override
     public Collection<String> doSharding(final Collection<String> availableTargetNames, final ComplexKeysShardingValue<Integer> shardingValue) {
@@ -31,6 +31,6 @@ public final class ComplexKeysShardingAlgorithmFixture implements ComplexKeysSha
     
     @Override
     public String getType() {
-        return "COMPLEX_TEST";
+        return "SPRING.COMPLEX.FIXTURE";
     }
 }
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
index c9f3918edb8..610bb9141f1 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
@@ -15,5 +15,5 @@
 # limitations under the License.
 #
  
-org.apache.shardingsphere.sharding.spring.namespace.fixture.sharding.ComplexKeysShardingAlgorithmFixture
+org.apache.shardingsphere.sharding.spring.namespace.fixture.sharding.SpringComplexKeysShardingAlgorithmFixture
 org.apache.shardingsphere.sharding.spring.namespace.fixture.sharding.SpringHintShardingAlgorithmFixture
diff --git a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/spring/sharding-application-context.xml b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/spring/sharding-application-context.xml
index ba22b3348c1..24201e8dd6d 100644
--- a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/spring/sharding-application-context.xml
+++ b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-spring/shardingsphere-sharding-spring-namespace/src/test/resources/META-INF/spring/sharding-application-context.xml
@@ -39,7 +39,7 @@
             <prop key="sharding-count">2</prop>
         </props>
     </sharding:sharding-algorithm>
-    <sharding:sharding-algorithm id="complexShardingAlgorithm" type="COMPLEX_TEST" />
+    <sharding:sharding-algorithm id="complexShardingAlgorithm" type="SPRING.COMPLEX.FIXTURE" />
     <sharding:sharding-algorithm id="hintShardingAlgorithm" type="SPRING.HINT.FIXTURE" />
     
     <sharding:standard-strategy id="dataSourceShardingStrategy" sharding-column="order_id" algorithm-ref="dataSourceShardingAlgorithm" />
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/MultiAlgorithm.java b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/DriverComplexKeysShardingAlgorithmFixture.java
similarity index 89%
rename from shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/MultiAlgorithm.java
rename to shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/DriverComplexKeysShardingAlgorithmFixture.java
index dbc4d67321f..903b0acc416 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/MultiAlgorithm.java
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/java/org/apache/shardingsphere/driver/fixture/algorithm/DriverComplexKeysShardingAlgorithmFixture.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardi
 
 import java.util.Collection;
 
-public final class MultiAlgorithm implements ComplexKeysShardingAlgorithm<String> {
+public final class DriverComplexKeysShardingAlgorithmFixture implements ComplexKeysShardingAlgorithm<String> {
     
     @Override
     public Collection<String> doSharding(final Collection<String> availableTargetNames, final ComplexKeysShardingValue<String> shardingValue) {
@@ -31,6 +31,6 @@ public final class MultiAlgorithm implements ComplexKeysShardingAlgorithm<String
     
     @Override
     public String getType() {
-        return "COMPLEX_TEST";
+        return "DRIVER.COMPLEX.FIXTURE";
     }
-}
\ No newline at end of file
+}
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
index c9faf1629ca..80f2a5bd15d 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
@@ -16,4 +16,4 @@
 #
  
 org.apache.shardingsphere.driver.fixture.algorithm.StandardAlgorithm
-org.apache.shardingsphere.driver.fixture.algorithm.MultiAlgorithm
+org.apache.shardingsphere.driver.fixture.algorithm.DriverComplexKeysShardingAlgorithmFixture
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml
index f5d5842ed94..54dcb4e10ec 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithProps.yaml
@@ -74,7 +74,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     t_order_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml
index 8089aacad0d..1729cb9c5f5 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithDataSourceWithoutProps.yaml
@@ -72,7 +72,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     t_order_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml
index 2b42f046dba..2d6e8fc4406 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding/configWithoutDataSourceWithoutProps.yaml
@@ -69,7 +69,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     t_order_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml
index a508013097c..6f48a08eb21 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithProps.yaml
@@ -86,7 +86,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     database_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml
index 8ce27ca02a4..c77e1717f7d 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithDataSourceWithoutProps.yaml
@@ -86,7 +86,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     database_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml
index e51d88e01ee..ff68f2dd09f 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithProps.yaml
@@ -69,7 +69,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     t_order_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml
index dd4ebbde3a8..b86ad00b645 100644
--- a/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml
+++ b/shardingsphere-test/shardingsphere-integration-driver-test/src/test/resources/yaml/integrate/sharding_readwrite_splitting/configWithoutDataSourceWithoutProps.yaml
@@ -69,7 +69,7 @@ rules:
     standard_test:
       type: STANDARD_TEST
     complex_test:
-      type: COMPLEX_TEST
+      type: DRIVER.COMPLEX.FIXTURE
     t_order_inline:
       type: INLINE
       props:
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/ComplexKeysShardingAlgorithmFixture.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/ComplexKeysShardingAlgorithmFixture.java
deleted file mode 100644
index 10cbbf42707..00000000000
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/ComplexKeysShardingAlgorithmFixture.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.rewrite.fixture;
-
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingAlgorithm;
-import org.apache.shardingsphere.sharding.api.sharding.complex.ComplexKeysShardingValue;
-
-import java.util.Collection;
-
-public final class ComplexKeysShardingAlgorithmFixture implements ComplexKeysShardingAlgorithm<Integer> {
-    
-    @Override
-    public Collection<String> doSharding(final Collection<String> availableTargetNames, final ComplexKeysShardingValue<Integer> shardingValue) {
-        return availableTargetNames;
-    }
-    
-    @Override
-    public String getType() {
-        return "COMPLEX_TEST";
-    }
-}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/StandardShardingAlgorithmFixture.java b/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/StandardShardingAlgorithmFixture.java
deleted file mode 100644
index 47786230481..00000000000
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/java/org/apache/shardingsphere/sharding/rewrite/fixture/StandardShardingAlgorithmFixture.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.sharding.rewrite.fixture;
-
-import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-
-import java.util.Collection;
-import java.util.HashSet;
-
-public final class StandardShardingAlgorithmFixture implements StandardShardingAlgorithm<Integer> {
-    
-    @Override
-    public String doSharding(final Collection<String> availableTargetNames, final PreciseShardingValue<Integer> shardingValue) {
-        for (String each : availableTargetNames) {
-            if (each.endsWith(String.valueOf(shardingValue.getValue() % 2))) {
-                return each;
-            }
-        }
-        return null;
-    }
-    
-    @Override
-    public Collection<String> doSharding(final Collection<String> availableTargetNames, final RangeShardingValue<Integer> shardingValue) {
-        Collection<String> result = new HashSet<>(2);
-        for (int i = shardingValue.getValueRange().lowerEndpoint(); i <= shardingValue.getValueRange().upperEndpoint(); i++) {
-            for (String each : availableTargetNames) {
-                if (each.endsWith(String.valueOf(i % 2))) {
-                    result.add(each);
-                }
-            }
-        }
-        return result;
-    }
-    
-    @Override
-    public String getType() {
-        return "STANDARD_TEST";
-    }
-}
diff --git a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm b/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
deleted file mode 100644
index 026d05afa01..00000000000
--- a/shardingsphere-test/shardingsphere-rewrite-test/src/test/resources/META-INF/services/org.apache.shardingsphere.sharding.spi.ShardingAlgorithm
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
- 
-org.apache.shardingsphere.sharding.rewrite.fixture.ComplexKeysShardingAlgorithmFixture
-org.apache.shardingsphere.sharding.rewrite.fixture.StandardShardingAlgorithmFixture