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/05/16 06:28:23 UTC
[shardingsphere] branch master updated: Add some unit tests for WeOpen-Star . (#17650)
This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 d7a44fd8b7c Add some unit tests for WeOpen-Star . (#17650)
d7a44fd8b7c is described below
commit d7a44fd8b7cda0780e87717e8126ca90005f8e49
Author: VOPEN.XYZ <x_...@yeah.net>
AuthorDate: Mon May 16 14:28:15 2022 +0800
Add some unit tests for WeOpen-Star . (#17650)
* Add some unit tests for WeOpen-Star .
* Fix checkstyle violations .
* Add the final modifier for test classes and removed useless blank lines .
---
.../pipeline/api/RuleAlteredJobAPIFactoryTest.java | 32 +++++
.../api/fixture/RuleAlteredJobAPIFixture.java | 138 +++++++++++++++++++++
...rdingsphere.data.pipeline.api.RuleAlteredJobAPI | 3 +-
.../DatabaseAdminExecutorCreatorFactoryTest.java | 38 ++++++
.../DatabaseAdminExecutorCreatorFixture.java | 48 +++++++
.../text/admin/fixture/FixtureDatabaseType.java | 67 ++++++++++
.../QueryableScalingFixtureQueryResultSet.java | 56 +++++++++
.../QueryableScalingFixtureRALStatement.java | 23 ++++
...eryableScalingRALBackendHandlerFactoryTest.java | 33 +++++
...hardingsphere.infra.database.type.DatabaseType} | 3 +-
...ingsphere.infra.distsql.query.DistSQLResultSet} | 3 +-
...here.infra.distsql.update.RuleDefinitionUpdater | 1 +
...xt.admin.executor.DatabaseAdminExecutorCreator} | 3 +-
13 files changed, 444 insertions(+), 4 deletions(-)
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/RuleAlteredJobAPIFactoryTest.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/RuleAlteredJobAPIFactoryTest.java
new file mode 100644
index 00000000000..f817f3fe269
--- /dev/null
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/RuleAlteredJobAPIFactoryTest.java
@@ -0,0 +1,32 @@
+/*
+ * 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.data.pipeline.api;
+
+import org.apache.shardingsphere.data.pipeline.api.fixture.RuleAlteredJobAPIFixture;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+
+public final class RuleAlteredJobAPIFactoryTest {
+
+ @Test
+ public void assertGetInstance() {
+ assertThat(RuleAlteredJobAPIFactory.getInstance(), instanceOf(RuleAlteredJobAPIFixture.class));
+ }
+}
diff --git a/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/fixture/RuleAlteredJobAPIFixture.java b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/fixture/RuleAlteredJobAPIFixture.java
new file mode 100644
index 00000000000..edf07cbf91b
--- /dev/null
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/java/org/apache/shardingsphere/data/pipeline/api/fixture/RuleAlteredJobAPIFixture.java
@@ -0,0 +1,138 @@
+/*
+ * 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.data.pipeline.api.fixture;
+
+import org.apache.shardingsphere.data.pipeline.api.RuleAlteredJobAPI;
+import org.apache.shardingsphere.data.pipeline.api.check.consistency.DataConsistencyCheckResult;
+import org.apache.shardingsphere.data.pipeline.api.config.rulealtered.RuleAlteredJobConfiguration;
+import org.apache.shardingsphere.data.pipeline.api.job.progress.JobProgress;
+import org.apache.shardingsphere.data.pipeline.api.pojo.DataConsistencyCheckAlgorithmInfo;
+import org.apache.shardingsphere.data.pipeline.api.pojo.JobInfo;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+
+public final class RuleAlteredJobAPIFixture implements RuleAlteredJobAPI {
+
+ @Override
+ public void startDisabledJob(final String jobId) {
+ }
+
+ @Override
+ public void stop(final String jobId) {
+ }
+
+ @Override
+ public void remove(final String jobId) {
+ }
+
+ @Override
+ public List<JobInfo> list() {
+ return null;
+ }
+
+ @Override
+ public Optional<String> start(final RuleAlteredJobConfiguration jobConfig) {
+ return Optional.empty();
+ }
+
+ @Override
+ public Map<Integer, JobProgress> getProgress(final String jobId) {
+ return null;
+ }
+
+ @Override
+ public Map<Integer, JobProgress> getProgress(final RuleAlteredJobConfiguration jobConfig) {
+ return null;
+ }
+
+ @Override
+ public void stopClusterWriteDB(final String jobId) {
+ }
+
+ @Override
+ public void stopClusterWriteDB(final String databaseName, final String jobId) {
+ }
+
+ @Override
+ public void restoreClusterWriteDB(final String jobId) {
+ }
+
+ @Override
+ public void restoreClusterWriteDB(final String databaseName, final String jobId) {
+ }
+
+ @Override
+ public Collection<DataConsistencyCheckAlgorithmInfo> listDataConsistencyCheckAlgorithms() {
+ return null;
+ }
+
+ @Override
+ public boolean isDataConsistencyCheckNeeded(final String jobId) {
+ return false;
+ }
+
+ @Override
+ public boolean isDataConsistencyCheckNeeded(final RuleAlteredJobConfiguration jobConfig) {
+ return false;
+ }
+
+ @Override
+ public Map<String, DataConsistencyCheckResult> dataConsistencyCheck(final String jobId) {
+ return null;
+ }
+
+ @Override
+ public Map<String, DataConsistencyCheckResult> dataConsistencyCheck(final RuleAlteredJobConfiguration jobConfig) {
+ return null;
+ }
+
+ @Override
+ public Map<String, DataConsistencyCheckResult> dataConsistencyCheck(final String jobId, final String algorithmType) {
+ return null;
+ }
+
+ @Override
+ public boolean aggregateDataConsistencyCheckResults(final String jobId, final Map<String, DataConsistencyCheckResult> checkResults) {
+ return false;
+ }
+
+ @Override
+ public void switchClusterConfiguration(final String jobId) {
+ }
+
+ @Override
+ public void switchClusterConfiguration(final RuleAlteredJobConfiguration jobConfig) {
+ }
+
+ @Override
+ public void reset(final String jobId) {
+ }
+
+ @Override
+ public RuleAlteredJobConfiguration getJobConfig(final String jobId) {
+ return null;
+ }
+
+ @Override
+ public boolean isDefault() {
+ return RuleAlteredJobAPI.super.isDefault();
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.api.RuleAlteredJobAPI
similarity index 89%
copy from shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
copy to shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.api.RuleAlteredJobAPI
index 546c3f1c21f..e1837337615 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++ b/shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-api/src/test/resources/META-INF/services/org.apache.shardingsphere.data.pipeline.api.RuleAlteredJobAPI
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-org.apache.shardingsphere.proxy.backend.text.distsql.fixture.FixtureRuleDefinitionCreateUpdater
+
+org.apache.shardingsphere.data.pipeline.api.fixture.RuleAlteredJobAPIFixture
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/DatabaseAdminExecutorCreatorFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/DatabaseAdminExecutorCreatorFactoryTest.java
new file mode 100644
index 00000000000..4141d323ed3
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/executor/DatabaseAdminExecutorCreatorFactoryTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.proxy.backend.text.admin.executor;
+
+import org.apache.shardingsphere.proxy.backend.text.admin.fixture.DatabaseAdminExecutorCreatorFixture;
+import org.apache.shardingsphere.proxy.backend.text.admin.fixture.FixtureDatabaseType;
+import org.junit.Test;
+
+import java.util.Optional;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+public final class DatabaseAdminExecutorCreatorFactoryTest {
+
+ @Test
+ public void assertFindInstance() {
+ Optional<DatabaseAdminExecutorCreator> actual = DatabaseAdminExecutorCreatorFactory.findInstance(new FixtureDatabaseType());
+ assertTrue(actual.isPresent());
+ assertThat(actual.get(), instanceOf(DatabaseAdminExecutorCreatorFixture.class));
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/DatabaseAdminExecutorCreatorFixture.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/DatabaseAdminExecutorCreatorFixture.java
new file mode 100644
index 00000000000..8afd2e5aff9
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/DatabaseAdminExecutorCreatorFixture.java
@@ -0,0 +1,48 @@
+/*
+ * 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.proxy.backend.text.admin.fixture;
+
+import org.apache.shardingsphere.infra.binder.statement.SQLStatementContext;
+import org.apache.shardingsphere.proxy.backend.text.admin.executor.DatabaseAdminExecutor;
+import org.apache.shardingsphere.proxy.backend.text.admin.executor.DatabaseAdminExecutorCreator;
+
+import java.util.Collection;
+import java.util.Optional;
+
+public final class DatabaseAdminExecutorCreatorFixture implements DatabaseAdminExecutorCreator {
+
+ @Override
+ public Optional<DatabaseAdminExecutor> create(final SQLStatementContext<?> sqlStatementContext) {
+ return Optional.empty();
+ }
+
+ @Override
+ public Optional<DatabaseAdminExecutor> create(final SQLStatementContext<?> sqlStatementContext, final String sql, final String schemaName) {
+ return Optional.empty();
+ }
+
+ @Override
+ public String getType() {
+ return new FixtureDatabaseType().getType();
+ }
+
+ @Override
+ public Collection<String> getTypeAliases() {
+ return DatabaseAdminExecutorCreator.super.getTypeAliases();
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/FixtureDatabaseType.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/FixtureDatabaseType.java
new file mode 100644
index 00000000000..f5415a103f7
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/admin/fixture/FixtureDatabaseType.java
@@ -0,0 +1,67 @@
+/*
+ * 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.proxy.backend.text.admin.fixture;
+
+import org.apache.shardingsphere.infra.database.metadata.DataSourceMetaData;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.sql.parser.sql.common.constant.QuoteCharacter;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.mockito.Mockito.mock;
+
+public final class FixtureDatabaseType implements DatabaseType {
+
+ @Override
+ public String getType() {
+ return "FixtureDB";
+ }
+
+ @Override
+ public QuoteCharacter getQuoteCharacter() {
+ return QuoteCharacter.NONE;
+ }
+
+ @Override
+ public Collection<String> getJdbcUrlPrefixes() {
+ return Collections.singleton("jdbc:fixture");
+ }
+
+ @Override
+ public DataSourceMetaData getDataSourceMetaData(final String url, final String username) {
+ return mock(DataSourceMetaData.class);
+ }
+
+ @Override
+ public Optional<String> getDataSourceClassName() {
+ return Optional.empty();
+ }
+
+ @Override
+ public Map<String, Collection<String>> getSystemDatabaseSchemaMap() {
+ return Collections.emptyMap();
+ }
+
+ @Override
+ public Collection<String> getSystemSchemas() {
+ return Collections.emptyList();
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureQueryResultSet.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureQueryResultSet.java
new file mode 100644
index 00000000000..75a05d18d73
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureQueryResultSet.java
@@ -0,0 +1,56 @@
+/*
+ * 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.proxy.backend.text.distsql.ral.scaling.fixture;
+
+import org.apache.shardingsphere.infra.distsql.query.DistSQLResultSet;
+import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
+
+import java.util.Collection;
+
+public final class QueryableScalingFixtureQueryResultSet implements DistSQLResultSet {
+
+ @Override
+ public void init(final ShardingSphereMetaData metaData, final SQLStatement sqlStatement) {
+ }
+
+ @Override
+ public Collection<String> getColumnNames() {
+ return null;
+ }
+
+ @Override
+ public boolean next() {
+ return false;
+ }
+
+ @Override
+ public Collection<Object> getRowData() {
+ return null;
+ }
+
+ @Override
+ public String getType() {
+ return QueryableScalingFixtureRALStatement.class.getName();
+ }
+
+ @Override
+ public Collection<String> getTypeAliases() {
+ return DistSQLResultSet.super.getTypeAliases();
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureRALStatement.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureRALStatement.java
new file mode 100644
index 00000000000..4d631484582
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/fixture/QueryableScalingFixtureRALStatement.java
@@ -0,0 +1,23 @@
+/*
+ * 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.proxy.backend.text.distsql.ral.scaling.fixture;
+
+import org.apache.shardingsphere.distsql.parser.statement.ral.scaling.QueryableScalingRALStatement;
+
+public final class QueryableScalingFixtureRALStatement extends QueryableScalingRALStatement {
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/query/QueryableScalingRALBackendHandlerFactoryTest.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/query/QueryableScalingRALBackendHandlerFactoryTest.java
new file mode 100644
index 00000000000..b2d492bd360
--- /dev/null
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/ral/scaling/query/QueryableScalingRALBackendHandlerFactoryTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.proxy.backend.text.distsql.ral.scaling.query;
+
+import org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.fixture.QueryableScalingFixtureQueryResultSet;
+import org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.fixture.QueryableScalingFixtureRALStatement;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+
+public final class QueryableScalingRALBackendHandlerFactoryTest {
+
+ @Test
+ public void assertNewInstance() {
+ assertThat(QueryableScalingRALBackendHandlerFactory.newInstance(new QueryableScalingFixtureRALStatement()), instanceOf(QueryableScalingFixtureQueryResultSet.class));
+ }
+}
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.type.DatabaseType
similarity index 89%
copy from shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
copy to shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.type.DatabaseType
index 546c3f1c21f..81caff5400e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.database.type.DatabaseType
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-org.apache.shardingsphere.proxy.backend.text.distsql.fixture.FixtureRuleDefinitionCreateUpdater
+
+org.apache.shardingsphere.proxy.backend.text.admin.fixture.FixtureDatabaseType
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.query.DistSQLResultSet
similarity index 87%
copy from shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
copy to shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.query.DistSQLResultSet
index 546c3f1c21f..ad94b786c54 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.query.DistSQLResultSet
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-org.apache.shardingsphere.proxy.backend.text.distsql.fixture.FixtureRuleDefinitionCreateUpdater
+
+org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.fixture.QueryableScalingFixtureQueryResultSet
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
index 546c3f1c21f..cad8ce0b5d6 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
org.apache.shardingsphere.proxy.backend.text.distsql.fixture.FixtureRuleDefinitionCreateUpdater
diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.proxy.backend.text.admin.executor.DatabaseAdminExecutorCreator
similarity index 89%
copy from shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
copy to shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.proxy.backend.text.admin.executor.DatabaseAdminExecutorCreator
index 546c3f1c21f..1c190ace88e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
+++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/resources/META-INF/services/org.apache.shardingsphere.proxy.backend.text.admin.executor.DatabaseAdminExecutorCreator
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-org.apache.shardingsphere.proxy.backend.text.distsql.fixture.FixtureRuleDefinitionCreateUpdater
+
+org.apache.shardingsphere.proxy.backend.text.admin.fixture.DatabaseAdminExecutorCreatorFixture