You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2023/03/21 06:51:45 UTC

[shardingsphere] branch master updated: Add E2ETestCaseArgumentsProvider (#24711)

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 70d83100d9c Add E2ETestCaseArgumentsProvider (#24711)
70d83100d9c is described below

commit 70d83100d9c152457126ef669c774c3d1d540872
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Tue Mar 21 14:51:38 2023 +0800

    Add E2ETestCaseArgumentsProvider (#24711)
---
 .../e2e/engine/E2ETestCaseArgumentsProvider.java   | 43 ++++++++++++++++++++++
 .../test/e2e/engine/E2ETestCaseSettings.java       | 39 ++++++++++++++++++++
 .../test/e2e/engine/dal/DALE2EIT.java              | 21 +++--------
 .../test/e2e/engine/dcl/DCLE2EIT.java              | 26 ++++---------
 .../test/e2e/engine/ddl/DDLE2EIT.java              | 25 ++++---------
 .../test/e2e/engine/dml/AdditionalDMLE2EIT.java    | 38 +++++++------------
 .../test/e2e/engine/dml/BaseDMLE2EIT.java          |  2 +-
 .../test/e2e/engine/dml/BatchDMLE2EIT.java         |  6 +--
 .../test/e2e/engine/dml/GeneralDMLE2EIT.java       | 26 ++++---------
 .../test/e2e/engine/dql/AdditionalDQLE2EIT.java    | 34 ++++++-----------
 .../test/e2e/engine/dql/GeneralDQLE2EIT.java       | 26 ++++---------
 .../test/e2e/engine/ral/RALE2EIT.java              | 21 +++--------
 .../test/e2e/engine/rdl/RDLE2EIT.java              | 21 +++--------
 .../test/e2e/engine/rql/RQLE2EIT.java              | 21 +++--------
 14 files changed, 158 insertions(+), 191 deletions(-)

diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseArgumentsProvider.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseArgumentsProvider.java
new file mode 100644
index 00000000000..e3a75f97a57
--- /dev/null
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseArgumentsProvider.java
@@ -0,0 +1,43 @@
+/*
+ * 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.test.e2e.engine;
+
+import com.google.common.base.Preconditions;
+import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
+import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.ArgumentsProvider;
+
+import java.util.Collection;
+import java.util.stream.Stream;
+
+/**
+ * E2E test case arguments provider.
+ */
+public final class E2ETestCaseArgumentsProvider implements ArgumentsProvider {
+    
+    @Override
+    public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
+        E2ETestCaseSettings settings = extensionContext.getRequiredTestClass().getAnnotation(E2ETestCaseSettings.class);
+        Preconditions.checkNotNull(settings, "Annotation E2ETestCaseSettings is required.");
+        Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(settings.value());
+        // TODO make sure test case can not be null
+        return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
+    }
+}
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseSettings.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseSettings.java
new file mode 100644
index 00000000000..7ef3dd79548
--- /dev/null
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/E2ETestCaseSettings.java
@@ -0,0 +1,39 @@
+/*
+ * 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.test.e2e.engine;
+
+import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * E2E test case settings.
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+public @interface E2ETestCaseSettings {
+    
+    /**
+     * Get SQL command type.
+     *
+     * @return SQL command type
+     */
+    SQLCommandType value();
+}
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dal/DALE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dal/DALE2EIT.java
index 4a889408f98..6e843989975 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dal/DALE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dal/DALE2EIT.java
@@ -22,16 +22,15 @@ import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
 import org.apache.shardingsphere.test.e2e.engine.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import java.sql.Connection;
@@ -45,20 +44,20 @@ import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.stream.Stream;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DAL)
 public final class DALE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException {
-        // TODO make sure DCL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -151,14 +150,4 @@ public final class DALE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DAL);
-            // TODO make sure DAL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dcl/DCLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dcl/DCLE2EIT.java
index 81c18cdd394..b8e03ade7af 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dcl/DCLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dcl/DCLE2EIT.java
@@ -19,6 +19,8 @@ package org.apache.shardingsphere.test.e2e.engine.dcl;
 
 import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.authority.AuthorityEnvironmentManager;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioCommonPath;
@@ -27,10 +29,7 @@ import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameter
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import javax.xml.bind.JAXBException;
@@ -40,17 +39,16 @@ import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
-import java.util.Collection;
-import java.util.stream.Stream;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DCL)
 public final class DCLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteUpdate(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DCL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -79,9 +77,9 @@ public final class DCLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DCL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -111,14 +109,4 @@ public final class DCLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DCL);
-            // TODO make sure DCL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ddl/DDLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ddl/DDLE2EIT.java
index 68cc3b98134..0a6a296b4d1 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ddl/DDLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ddl/DDLE2EIT.java
@@ -26,16 +26,15 @@ import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetIndex;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import java.sql.Connection;
@@ -51,7 +50,6 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -59,13 +57,14 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DDL)
 public final class DDLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteUpdate(final AssertionTestParameter testParam) throws SQLException, ParseException {
-        // TODO make sure DDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -99,9 +98,9 @@ public final class DDLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws Exception {
-        // TODO make sure DDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -293,14 +292,4 @@ public final class DDLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DDL);
-            // TODO make sure DDL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/AdditionalDMLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/AdditionalDMLE2EIT.java
index 649dec8121a..5bdeb1b0c8b 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/AdditionalDMLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/AdditionalDMLE2EIT.java
@@ -20,6 +20,8 @@ package org.apache.shardingsphere.test.e2e.engine.dml;
 import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.env.runtime.IntegrationTestEnvironment;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
@@ -28,10 +30,7 @@ import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestPar
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import javax.xml.bind.JAXBException;
@@ -41,19 +40,18 @@ import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
-import java.util.Collection;
-import java.util.stream.Stream;
 
 import static org.junit.jupiter.api.Assertions.assertFalse;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DML)
 public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void executeUpdateWithAutoGeneratedKeys(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -101,7 +99,7 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     @Disabled
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteUpdateWithColumnIndexes(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
@@ -137,7 +135,7 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     @Disabled
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteUpdateWithColumnNames(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
@@ -171,9 +169,9 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithoutAutoGeneratedKeys(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -211,9 +209,9 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithAutoGeneratedKeys(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -258,7 +256,7 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     @Disabled
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithColumnIndexes(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
@@ -296,7 +294,7 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     @Disabled
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithColumnNames(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
@@ -333,14 +331,4 @@ public final class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter() && IntegrationTestEnvironment.getInstance().isRunAdditionalTestCases();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DML);
-            // TODO make sure DML test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BaseDMLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BaseDMLE2EIT.java
index 7436bbed137..1ac848439ca 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BaseDMLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BaseDMLE2EIT.java
@@ -75,7 +75,7 @@ public abstract class BaseDMLE2EIT {
     
     @AfterEach
     public final void tearDown() {
-        // TODO make sure DML test case can not be null
+        // TODO make sure test case can not be null
         if (null != dataSetEnvironmentManager) {
             dataSetEnvironmentManager.cleanData();
         }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BatchDMLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BatchDMLE2EIT.java
index e73a577f0a3..6278f2f4174 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BatchDMLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/BatchDMLE2EIT.java
@@ -49,7 +49,7 @@ public final class BatchDMLE2EIT {
     @EnabledIf("isEnabled")
     @ArgumentsSource(TestCaseArgumentsProvider.class)
     public void assertExecuteBatch(final CaseTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DML test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -82,7 +82,7 @@ public final class BatchDMLE2EIT {
     @EnabledIf("isEnabled")
     @ArgumentsSource(TestCaseArgumentsProvider.class)
     public void assertClearBatch(final CaseTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DML test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -108,7 +108,7 @@ public final class BatchDMLE2EIT {
         @Override
         public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
             Collection<E2ETestParameter> result = E2ETestParameterFactory.getCaseTestParameters(SQLCommandType.DML);
-            // TODO make sure DML test case can not be null
+            // TODO make sure test case can not be null
             return result.isEmpty() ? Stream.of(Arguments.of(new CaseTestParameter(null, null, null, null, null))) : result.stream().map(Arguments::of);
         }
     }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/GeneralDMLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/GeneralDMLE2EIT.java
index 7cad511d4bf..ceada863305 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/GeneralDMLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dml/GeneralDMLE2EIT.java
@@ -20,16 +20,15 @@ package org.apache.shardingsphere.test.e2e.engine.dml;
 import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import javax.xml.bind.JAXBException;
@@ -39,19 +38,18 @@ import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
-import java.util.Collection;
-import java.util.stream.Stream;
 
 import static org.junit.jupiter.api.Assertions.assertFalse;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DML)
 public final class GeneralDMLE2EIT extends BaseDMLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteUpdate(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DML test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -84,9 +82,9 @@ public final class GeneralDMLE2EIT extends BaseDMLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DML test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -122,14 +120,4 @@ public final class GeneralDMLE2EIT extends BaseDMLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DML);
-            // TODO make sure DML test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/AdditionalDQLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/AdditionalDQLE2EIT.java
index 90f8fd5c535..cc9caa9136f 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/AdditionalDQLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/AdditionalDQLE2EIT.java
@@ -20,6 +20,8 @@ package org.apache.shardingsphere.test.e2e.engine.dql;
 import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.env.runtime.IntegrationTestEnvironment;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
@@ -27,10 +29,7 @@ import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameter
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import javax.xml.bind.JAXBException;
@@ -41,19 +40,18 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
-import java.util.Collection;
-import java.util.stream.Stream;
 
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DQL)
 public final class AdditionalDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteQueryWithResultSetTypeAndConcurrency(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -73,9 +71,9 @@ public final class AdditionalDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteQueryWithResultSetTypeAndConcurrencyAndHoldability(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -95,9 +93,9 @@ public final class AdditionalDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithResultSetTypeAndConcurrency(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -117,9 +115,9 @@ public final class AdditionalDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteWithResultSetTypeAndConcurrencyAndHoldability(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -268,14 +266,4 @@ public final class AdditionalDQLE2EIT extends BaseDQLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter() && IntegrationTestEnvironment.getInstance().isRunAdditionalTestCases();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DQL);
-            // TODO make sure DQL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/GeneralDQLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/GeneralDQLE2EIT.java
index 8be6166c1cd..e46e50e47ce 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/GeneralDQLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/dql/GeneralDQLE2EIT.java
@@ -20,16 +20,15 @@ package org.apache.shardingsphere.test.e2e.engine.dql;
 import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import javax.xml.bind.JAXBException;
@@ -40,19 +39,18 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.text.ParseException;
-import java.util.Collection;
-import java.util.stream.Stream;
 
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.DQL)
 public final class GeneralDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecuteQuery(final AssertionTestParameter testParam) throws SQLException, ParseException, IOException, JAXBException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -122,9 +120,9 @@ public final class GeneralDQLE2EIT extends BaseDQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException, JAXBException, IOException {
-        // TODO make sure DQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -199,14 +197,4 @@ public final class GeneralDQLE2EIT extends BaseDQLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.DQL);
-            // TODO make sure DQL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ral/RALE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ral/RALE2EIT.java
index f6b34bcad82..ddc7b6a8b0c 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ral/RALE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/ral/RALE2EIT.java
@@ -23,16 +23,15 @@ import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import java.sql.Connection;
@@ -46,20 +45,20 @@ import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.RAL)
 public final class RALE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException {
-        // TODO make sure RAL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -198,14 +197,4 @@ public final class RALE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter() && !E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RAL).isEmpty();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RAL);
-            // TODO make sure RAL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rdl/RDLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rdl/RDLE2EIT.java
index 501d7e9de66..f01c9e82086 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rdl/RDLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rdl/RDLE2EIT.java
@@ -23,16 +23,15 @@ import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import java.sql.Connection;
@@ -45,7 +44,6 @@ import java.text.ParseException;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.stream.Stream;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -53,13 +51,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.RDL)
 public final class RDLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException {
-        // TODO make sure RDL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -184,14 +183,4 @@ public final class RDLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter() && !E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RDL).isEmpty();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RDL);
-            // TODO make sure RDL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }
diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rql/RQLE2EIT.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rql/RQLE2EIT.java
index 3012ea1f6a8..e013c0508ac 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rql/RQLE2EIT.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/engine/rql/RQLE2EIT.java
@@ -21,16 +21,15 @@ import org.apache.shardingsphere.test.e2e.cases.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseArgumentsProvider;
+import org.apache.shardingsphere.test.e2e.engine.E2ETestCaseSettings;
 import org.apache.shardingsphere.test.e2e.engine.SingleE2EITContainerComposer;
 import org.apache.shardingsphere.test.e2e.framework.E2EITExtension;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.jupiter.api.extension.ExtensionContext;
 import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.Arguments;
-import org.junit.jupiter.params.provider.ArgumentsProvider;
 import org.junit.jupiter.params.provider.ArgumentsSource;
 
 import java.sql.Connection;
@@ -42,20 +41,20 @@ import java.text.ParseException;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.stream.Stream;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @ExtendWith(E2EITExtension.class)
+@E2ETestCaseSettings(SQLCommandType.RQL)
 public final class RQLE2EIT {
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
-    @ArgumentsSource(TestCaseArgumentsProvider.class)
+    @ArgumentsSource(E2ETestCaseArgumentsProvider.class)
     public void assertExecute(final AssertionTestParameter testParam) throws SQLException, ParseException {
-        // TODO make sure RQL test case can not be null
+        // TODO make sure test case can not be null
         if (null == testParam.getTestCaseContext()) {
             return;
         }
@@ -123,14 +122,4 @@ public final class RQLE2EIT {
     private static boolean isEnabled() {
         return E2ETestParameterFactory.containsTestParameter() && !E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RQL).isEmpty();
     }
-    
-    private static class TestCaseArgumentsProvider implements ArgumentsProvider {
-        
-        @Override
-        public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
-            Collection<AssertionTestParameter> result = E2ETestParameterFactory.getAssertionTestParameters(SQLCommandType.RQL);
-            // TODO make sure RQL test case can not be null
-            return result.isEmpty() ? Stream.of(Arguments.of(new AssertionTestParameter(null, null, null, null, null, null, null))) : result.stream().map(Arguments::of);
-        }
-    }
 }