This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 0e526eac3e0 Rename IntegrationTestCases to E2ETestCases (#32158)
0e526eac3e0 is described below
commit 0e526eac3e0025915f7ea151b8a296615ad0bf2a
Author: Liang Zhang <[email protected]>
AuthorDate: Wed Jul 17 21:55:32 2024 +0800
Rename IntegrationTestCases to E2ETestCases (#32158)
---
.../cases/jaxb/{IntegrationTestCase.java => E2ETestCase.java} | 8 ++++----
.../jaxb/{IntegrationTestCases.java => E2ETestCases.java} | 6 +++---
...grationTestCaseAssertion.java => E2ETestCaseAssertion.java} | 10 +++++-----
...nTestCaseAssertionSQL.java => E2ETestCaseAssertionSQL.java} | 4 ++--
.../test/e2e/cases/loader/IntegrationTestCaseContext.java | 4 ++--
.../test/e2e/cases/loader/IntegrationTestCasesLoader.java | 6 +++---
.../test/e2e/engine/composer/BatchE2EContainerComposer.java | 4 ++--
.../test/e2e/engine/composer/SingleE2EContainerComposer.java | 4 ++--
.../shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java | 8 ++++----
.../e2e/framework/param/array/E2ETestParameterGenerator.java | 8 ++++----
.../test/e2e/framework/param/model/AssertionTestParameter.java | 4 ++--
11 files changed, 33 insertions(+), 33 deletions(-)
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCase.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCase.java
similarity index 86%
rename from
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCase.java
rename to
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCase.java
index 6df4fe56706..ab8c3659093 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCase.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCase.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.test.e2e.cases.jaxb;
import lombok.Getter;
import lombok.Setter;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@@ -29,12 +29,12 @@ import java.util.Collection;
import java.util.LinkedList;
/**
- * JAXB definition of integration test case.
+ * JAXB definition of E2E test case.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
-public final class IntegrationTestCase {
+public final class E2ETestCase {
@XmlAttribute
private String sql;
@@ -58,5 +58,5 @@ public final class IntegrationTestCase {
private boolean smoke;
@XmlElement(name = "assertion")
- private Collection<IntegrationTestCaseAssertion> assertions = new
LinkedList<>();
+ private Collection<E2ETestCaseAssertion> assertions = new LinkedList<>();
}
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCases.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCases.java
similarity index 87%
rename from
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCases.java
rename to
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCases.java
index 2ec6c4c3c5b..f7d6826e8ea 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/IntegrationTestCases.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/E2ETestCases.java
@@ -25,12 +25,12 @@ import java.util.Collection;
import java.util.LinkedList;
/**
- * JAXB definition of integration test cases.
+ * JAXB definition of E2E test cases.
*/
@XmlRootElement(name = "integration-test-cases")
@Getter
-public final class IntegrationTestCases {
+public final class E2ETestCases {
@XmlElement(name = "test-case")
- private final Collection<IntegrationTestCase> testCases = new
LinkedList<>();
+ private final Collection<E2ETestCase> testCases = new LinkedList<>();
}
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertion.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertion.java
similarity index 91%
rename from
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertion.java
rename to
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertion.java
index 08f74dcaac8..09cbfc813b4 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertion.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertion.java
@@ -33,12 +33,12 @@ import java.util.LinkedList;
import java.util.List;
/**
- * JAXB definition of integration test case assertion.
+ * JAXB definition of E2E test case assertion.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
-public final class IntegrationTestCaseAssertion {
+public final class E2ETestCaseAssertion {
@XmlAttribute(name = "expected-data-source-name")
private String expectedDataSourceName;
@@ -53,13 +53,13 @@ public final class IntegrationTestCaseAssertion {
private String parameters;
@XmlElement(name = "initial-sql")
- private IntegrationTestCaseAssertionSQL initialSQL;
+ private E2ETestCaseAssertionSQL initialSQL;
@XmlElement(name = "assertion-sql")
- private IntegrationTestCaseAssertionSQL assertionSQL;
+ private E2ETestCaseAssertionSQL assertionSQL;
@XmlElement(name = "destroy-sql")
- private IntegrationTestCaseAssertionSQL destroySQL;
+ private E2ETestCaseAssertionSQL destroySQL;
/**
* Get SQL values.
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertionSQL.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertionSQL.java
similarity index 91%
rename from
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertionSQL.java
rename to
test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertionSQL.java
index 6e74351f7e0..ec0b9002b5e 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/IntegrationTestCaseAssertionSQL.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/jaxb/assertion/E2ETestCaseAssertionSQL.java
@@ -25,12 +25,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
/**
- * JAXB definition of integration test case assertion initial SQL.
+ * JAXB definition of E2E test case assertion initial SQL.
*/
@XmlAccessorType(XmlAccessType.FIELD)
@Getter
@Setter
-public final class IntegrationTestCaseAssertionSQL {
+public final class E2ETestCaseAssertionSQL {
@XmlAttribute
private String sql;
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCaseContext.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCaseContext.java
index fd166ff6d50..a285512dee4 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCaseContext.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCaseContext.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.test.e2e.cases.loader;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
-import org.apache.shardingsphere.test.e2e.cases.jaxb.IntegrationTestCase;
+import org.apache.shardingsphere.test.e2e.cases.jaxb.E2ETestCase;
/**
* Integration test case context.
@@ -28,7 +28,7 @@ import
org.apache.shardingsphere.test.e2e.cases.jaxb.IntegrationTestCase;
@Getter
public final class IntegrationTestCaseContext {
- private final IntegrationTestCase testCase;
+ private final E2ETestCase testCase;
private final String parentPath;
}
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCasesLoader.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCasesLoader.java
index cf7e079da7f..a93b2688846 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCasesLoader.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/cases/loader/IntegrationTestCasesLoader.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.test.e2e.cases.loader;
import com.google.common.base.Preconditions;
import lombok.SneakyThrows;
-import org.apache.shardingsphere.test.e2e.cases.jaxb.IntegrationTestCases;
+import org.apache.shardingsphere.test.e2e.cases.jaxb.E2ETestCases;
import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
import javax.xml.bind.JAXBContext;
@@ -107,9 +107,9 @@ public final class IntegrationTestCasesLoader {
return unmarshal(file.getPath()).getTestCases().stream().map(each ->
new IntegrationTestCaseContext(each,
file.getParent())).collect(Collectors.toList());
}
- private IntegrationTestCases unmarshal(final String integrateCasesFile)
throws IOException, JAXBException {
+ private E2ETestCases unmarshal(final String integrateCasesFile) throws
IOException, JAXBException {
try (FileReader reader = new FileReader(integrateCasesFile)) {
- return (IntegrationTestCases)
JAXBContext.newInstance(IntegrationTestCases.class).createUnmarshaller().unmarshal(reader);
+ return (E2ETestCases)
JAXBContext.newInstance(E2ETestCases.class).createUnmarshaller().unmarshal(reader);
}
}
}
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/BatchE2EContainerComposer.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/BatchE2EContainerComposer.java
index cb7a304ee07..92d5e437f5b 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/BatchE2EContainerComposer.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/BatchE2EContainerComposer.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.test.e2e.engine.composer;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
import org.apache.shardingsphere.test.e2e.cases.jaxb.dataset.DataSet;
import org.apache.shardingsphere.test.e2e.cases.loader.DataSetLoader;
import org.apache.shardingsphere.test.e2e.cases.jaxb.dataset.row.DataSetRow;
@@ -49,7 +49,7 @@ public final class BatchE2EContainerComposer extends
E2EContainerComposer implem
public BatchE2EContainerComposer(final CaseTestParameter testParam) throws
JAXBException, IOException {
super(testParam);
- for (IntegrationTestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
+ for (E2ETestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
dataSets.add(DataSetLoader.load(testParam.getTestCaseContext().getParentPath(),
testParam.getScenario(), testParam.getDatabaseType(), testParam.getMode(),
each.getExpectedDataFile()));
}
dataSetEnvironmentManager = new DataSetEnvironmentManager(new
ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.ACTUAL),
getActualDataSourceMap(), testParam.getDatabaseType());
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/SingleE2EContainerComposer.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/SingleE2EContainerComposer.java
index c1062f1d233..5cae6f12db5 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/SingleE2EContainerComposer.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/SingleE2EContainerComposer.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.test.e2e.engine.composer;
import lombok.Getter;
import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
import org.apache.shardingsphere.test.e2e.cases.jaxb.dataset.DataSet;
import org.apache.shardingsphere.test.e2e.cases.loader.DataSetLoader;
import org.apache.shardingsphere.test.e2e.cases.jaxb.value.SQLValue;
@@ -39,7 +39,7 @@ public final class SingleE2EContainerComposer extends
E2EContainerComposer {
private final SQLExecuteType sqlExecuteType;
- private final IntegrationTestCaseAssertion assertion;
+ private final E2ETestCaseAssertion assertion;
private final DataSet dataSet;
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
index c362f0a2132..1917cd92a9b 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.test.e2e.engine.type.dml;
import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
import org.apache.shardingsphere.test.e2e.cases.jaxb.value.SQLValue;
import
org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
@@ -60,14 +60,14 @@ class BatchDMLE2EIT extends BaseDMLE2EIT {
private int[] executeBatchForPreparedStatement(final CaseTestParameter
testParam, final Connection connection) throws SQLException {
try (PreparedStatement preparedStatement =
connection.prepareStatement(testParam.getTestCaseContext().getTestCase().getSql()))
{
- for (IntegrationTestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
+ for (E2ETestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
addBatch(preparedStatement, each);
}
return preparedStatement.executeBatch();
}
}
- private void addBatch(final PreparedStatement preparedStatement, final
IntegrationTestCaseAssertion assertion) throws SQLException {
+ private void addBatch(final PreparedStatement preparedStatement, final
E2ETestCaseAssertion assertion) throws SQLException {
for (SQLValue each : assertion.getSQLValues()) {
preparedStatement.setObject(each.getIndex(), each.getValue());
}
@@ -86,7 +86,7 @@ class BatchDMLE2EIT extends BaseDMLE2EIT {
try (
Connection connection =
containerComposer.getTargetDataSource().getConnection();
PreparedStatement preparedStatement =
connection.prepareStatement(testParam.getTestCaseContext().getTestCase().getSql()))
{
- for (IntegrationTestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
+ for (E2ETestCaseAssertion each :
testParam.getTestCaseContext().getTestCase().getAssertions()) {
addBatch(preparedStatement, each);
}
preparedStatement.clearBatch();
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/array/E2ETestParameterGenerator.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/array/E2ETestParameterGenerator.java
index 173b0ddb865..f19a112a4d7 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/array/E2ETestParameterGenerator.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/array/E2ETestParameterGenerator.java
@@ -29,7 +29,7 @@ import
org.apache.shardingsphere.test.e2e.cases.loader.IntegrationTestCaseContex
import
org.apache.shardingsphere.test.e2e.cases.loader.IntegrationTestCasesLoader;
import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
import
org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
import
org.apache.shardingsphere.test.e2e.framework.param.model.CaseTestParameter;
import
org.apache.shardingsphere.test.e2e.framework.param.model.E2ETestParameter;
@@ -100,7 +100,7 @@ public final class E2ETestParameterGenerator {
private Collection<AssertionTestParameter> getAssertionTestParameter(final
IntegrationTestCaseContext testCaseContext,
final
DatabaseType databaseType, final SQLExecuteType sqlExecuteType, final
SQLCommandType sqlCommandType) {
Collection<AssertionTestParameter> result = new LinkedList<>();
- for (IntegrationTestCaseAssertion each :
testCaseContext.getTestCase().getAssertions()) {
+ for (E2ETestCaseAssertion each :
testCaseContext.getTestCase().getAssertions()) {
result.addAll(getAssertionTestParameter(testCaseContext,
databaseType, sqlExecuteType, each, sqlCommandType));
}
return result;
@@ -108,7 +108,7 @@ public final class E2ETestParameterGenerator {
private Collection<AssertionTestParameter> getAssertionTestParameter(final
IntegrationTestCaseContext testCaseContext,
final
DatabaseType databaseType, final SQLExecuteType sqlExecuteType,
- final
IntegrationTestCaseAssertion assertion, final SQLCommandType sqlCommandType) {
+ final
E2ETestCaseAssertion assertion, final SQLCommandType sqlCommandType) {
Collection<AssertionTestParameter> result = new LinkedList<>();
for (String each :
getEnvAdapters(testCaseContext.getTestCase().getAdapters())) {
if (sqlCommandType.getRunningAdaptors().contains(each) &&
envAdapters.contains(each)) {
@@ -118,7 +118,7 @@ public final class E2ETestParameterGenerator {
return result;
}
- private Collection<AssertionTestParameter> getAssertionTestParameter(final
IntegrationTestCaseContext testCaseContext, final IntegrationTestCaseAssertion
assertion,
+ private Collection<AssertionTestParameter> getAssertionTestParameter(final
IntegrationTestCaseContext testCaseContext, final E2ETestCaseAssertion
assertion,
final
String adapter, final DatabaseType databaseType,
final
SQLExecuteType sqlExecuteType, final SQLCommandType sqlCommandType) {
Collection<String> scenarios = null ==
testCaseContext.getTestCase().getScenarioTypes() ? Collections.emptyList() :
Arrays.asList(testCaseContext.getTestCase().getScenarioTypes().split(","));
diff --git
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/AssertionTestParameter.java
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/AssertionTestParameter.java
index 5ccac7ec819..9e3b5d1c21a 100644
---
a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/AssertionTestParameter.java
+++
b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/framework/param/model/AssertionTestParameter.java
@@ -23,7 +23,7 @@ import
org.apache.shardingsphere.infra.database.core.type.DatabaseType;
import
org.apache.shardingsphere.test.e2e.cases.loader.IntegrationTestCaseContext;
import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
-import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.IntegrationTestCaseAssertion;
+import
org.apache.shardingsphere.test.e2e.cases.jaxb.assertion.E2ETestCaseAssertion;
/**
* Assertion test parameter.
@@ -34,7 +34,7 @@ public final class AssertionTestParameter implements
E2ETestParameter {
private final IntegrationTestCaseContext testCaseContext;
- private final IntegrationTestCaseAssertion assertion;
+ private final E2ETestCaseAssertion assertion;
private final String adapter;