提交 f12c88a8 编写于 作者: C cherrylzhao

for #2494 rename IntegrateTest => IT for convention within sharding-integration-test.

上级 b8acfb9c
......@@ -51,7 +51,7 @@ import java.util.TimeZone;
@RunWith(Parameterized.class)
@Getter(AccessLevel.PROTECTED)
public abstract class BaseIntegrateTest {
public abstract class BaseIT {
private static IntegrateTestEnvironment integrateTestEnvironment = IntegrateTestEnvironment.getInstance();
......@@ -71,7 +71,7 @@ public abstract class BaseIntegrateTest {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
}
public BaseIntegrateTest(final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
public BaseIT(final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
this.shardingRuleType = shardingRuleType;
this.databaseTypeEnvironment = databaseTypeEnvironment;
if (databaseTypeEnvironment.isEnabled()) {
......
......@@ -64,7 +64,7 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
@Getter(value = AccessLevel.PROTECTED)
public abstract class BatchIntegrateTest extends BaseIntegrateTest {
public abstract class BatchIT extends BaseIT {
private static DataSetEnvironmentManager dataSetEnvironmentManager;
......@@ -74,8 +74,8 @@ public abstract class BatchIntegrateTest extends BaseIntegrateTest {
private final Collection<String> expectedDataFiles;
public BatchIntegrateTest(final String sqlCaseId, final IntegrateTestCase integrateTestCase,
final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
public BatchIT(final String sqlCaseId, final IntegrateTestCase integrateTestCase,
final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
super(shardingRuleType, databaseTypeEnvironment);
this.integrateTestCase = integrateTestCase;
sql = SQLCasesLoader.getInstance().getSupportedSQL(sqlCaseId, SQLCaseType.Placeholder, Collections.emptyList());
......
......@@ -35,7 +35,7 @@ import java.util.LinkedList;
import java.util.List;
@Getter(AccessLevel.PROTECTED)
public abstract class SingleIntegrateTest extends BaseIntegrateTest {
public abstract class SingleIT extends BaseIT {
private static IntegrateTestEnvironment integrateTestEnvironment = IntegrateTestEnvironment.getInstance();
......@@ -49,8 +49,8 @@ public abstract class SingleIntegrateTest extends BaseIntegrateTest {
private final String expectedDataFile;
public SingleIntegrateTest(final String sqlCaseId, final String path, final IntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType)
public SingleIT(final String sqlCaseId, final String path, final IntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType)
throws IOException, JAXBException, SQLException, ParseException {
super(shardingRuleType, databaseTypeEnvironment);
this.assertion = assertion;
......
......@@ -18,7 +18,7 @@
package org.apache.shardingsphere.dbtest.engine.dcl;
import org.apache.shardingsphere.dbtest.cases.assertion.dcl.DCLIntegrateTestCaseAssertion;
import org.apache.shardingsphere.dbtest.engine.SingleIntegrateTest;
import org.apache.shardingsphere.dbtest.engine.SingleIT;
import org.apache.shardingsphere.dbtest.env.DatabaseTypeEnvironment;
import org.apache.shardingsphere.dbtest.env.EnvironmentPath;
import org.apache.shardingsphere.dbtest.env.authority.AuthorityEnvironmentManager;
......@@ -34,12 +34,12 @@ import java.io.IOException;
import java.sql.SQLException;
import java.text.ParseException;
public abstract class BaseDCLIntegrateTest extends SingleIntegrateTest {
public abstract class BaseDCLIT extends SingleIT {
private final AuthorityEnvironmentManager authorityEnvironmentManager;
public BaseDCLIntegrateTest(final String sqlCaseId, final String path, final DCLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public BaseDCLIT(final String sqlCaseId, final String path, final DCLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
authorityEnvironmentManager = new AuthorityEnvironmentManager(
EnvironmentPath.getAuthorityResourcesPath(shardingRuleType), getInstanceDataSourceMap(), getDatabaseTypeEnvironment().getDatabaseType());
......
......@@ -32,10 +32,10 @@ import java.sql.SQLException;
import java.text.ParseException;
import java.util.Collection;
public final class GeneralDCLIntegrateTest extends BaseDCLIntegrateTest {
public final class GeneralDCLIT extends BaseDCLIT {
public GeneralDCLIntegrateTest(final String sqlCaseId, final String path, final DCLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public GeneralDCLIT(final String sqlCaseId, final String path, final DCLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
}
......
......@@ -23,7 +23,7 @@ import org.apache.shardingsphere.dbtest.cases.dataset.DataSet;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetColumn;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetIndex;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetMetadata;
import org.apache.shardingsphere.dbtest.engine.SingleIntegrateTest;
import org.apache.shardingsphere.dbtest.engine.SingleIT;
import org.apache.shardingsphere.dbtest.env.DatabaseTypeEnvironment;
import org.apache.shardingsphere.dbtest.env.EnvironmentPath;
import org.apache.shardingsphere.dbtest.env.dataset.DataSetEnvironmentManager;
......@@ -52,14 +52,14 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
@Slf4j
public abstract class BaseDDLIntegrateTest extends SingleIntegrateTest {
public abstract class BaseDDLIT extends SingleIT {
private final DDLIntegrateTestCaseAssertion assertion;
private final String databaseType;
public BaseDDLIntegrateTest(final String sqlCaseId, final String path, final DDLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public BaseDDLIT(final String sqlCaseId, final String path, final DDLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
databaseType = databaseTypeEnvironment.getDatabaseType();
......
......@@ -34,12 +34,12 @@ import java.sql.SQLException;
import java.text.ParseException;
import java.util.Collection;
public final class GeneralDDLIntegrateTest extends BaseDDLIntegrateTest {
public final class GeneralDDLIT extends BaseDDLIT {
private final DDLIntegrateTestCaseAssertion assertion;
public GeneralDDLIntegrateTest(final String sqlCaseId, final String path, final DDLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public GeneralDDLIT(final String sqlCaseId, final String path, final DDLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
}
......
......@@ -39,14 +39,14 @@ import java.util.Collections;
import static org.junit.Assert.assertFalse;
public final class AdditionalDMLIntegrateTest extends BaseDMLIntegrateTest {
public final class AdditionalDMLIT extends BaseDMLIT {
private static IntegrateTestEnvironment integrateTestEnvironment = IntegrateTestEnvironment.getInstance();
private final DMLIntegrateTestCaseAssertion assertion;
public AdditionalDMLIntegrateTest(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public AdditionalDMLIT(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
}
......
......@@ -24,7 +24,7 @@ import org.apache.shardingsphere.dbtest.cases.dataset.DataSet;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetColumn;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetMetadata;
import org.apache.shardingsphere.dbtest.cases.dataset.row.DataSetRow;
import org.apache.shardingsphere.dbtest.engine.SingleIntegrateTest;
import org.apache.shardingsphere.dbtest.engine.SingleIT;
import org.apache.shardingsphere.dbtest.env.DatabaseTypeEnvironment;
import org.apache.shardingsphere.dbtest.env.EnvironmentPath;
import org.apache.shardingsphere.dbtest.env.dataset.DataSetEnvironmentManager;
......@@ -51,12 +51,12 @@ import java.util.List;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public abstract class BaseDMLIntegrateTest extends SingleIntegrateTest {
public abstract class BaseDMLIT extends SingleIT {
private final DataSetEnvironmentManager dataSetEnvironmentManager;
public BaseDMLIntegrateTest(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public BaseDMLIT(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
dataSetEnvironmentManager = new DataSetEnvironmentManager(EnvironmentPath.getDataInitializeResourceFile(getShardingRuleType()), getDataSourceMap());
}
......
......@@ -20,7 +20,7 @@ package org.apache.shardingsphere.dbtest.engine.dml;
import org.apache.shardingsphere.dbtest.cases.assertion.root.IntegrateTestCase;
import org.apache.shardingsphere.dbtest.cases.assertion.root.IntegrateTestCaseAssertion;
import org.apache.shardingsphere.dbtest.cases.assertion.root.SQLValue;
import org.apache.shardingsphere.dbtest.engine.BatchIntegrateTest;
import org.apache.shardingsphere.dbtest.engine.BatchIT;
import org.apache.shardingsphere.dbtest.env.DatabaseTypeEnvironment;
import org.junit.Test;
......@@ -34,12 +34,12 @@ import java.text.ParseException;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public final class BatchDMLIntegrateTest extends BatchIntegrateTest {
public final class BatchDMLIT extends BatchIT {
private final IntegrateTestCase integrateTestCase;
public BatchDMLIntegrateTest(final String sqlCaseId, final IntegrateTestCase integrateTestCase,
final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
public BatchDMLIT(final String sqlCaseId, final IntegrateTestCase integrateTestCase,
final String shardingRuleType, final DatabaseTypeEnvironment databaseTypeEnvironment) throws IOException, JAXBException, SQLException {
super(sqlCaseId, integrateTestCase, shardingRuleType, databaseTypeEnvironment);
this.integrateTestCase = integrateTestCase;
}
......
......@@ -37,12 +37,12 @@ import java.util.Collection;
import static org.junit.Assert.assertFalse;
public final class GeneralDMLIntegrateTest extends BaseDMLIntegrateTest {
public final class GeneralDMLIT extends BaseDMLIT {
private final DMLIntegrateTestCaseAssertion assertion;
public GeneralDMLIntegrateTest(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public GeneralDMLIT(final String sqlCaseId, final String path, final DMLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
}
......
......@@ -40,14 +40,14 @@ import java.util.Collections;
import static org.junit.Assert.assertTrue;
public final class AdditionalDQLIntegrateTest extends BaseDQLIntegrateTest {
public final class AdditionalDQLIT extends BaseDQLIT {
private static IntegrateTestEnvironment integrateTestEnvironment = IntegrateTestEnvironment.getInstance();
private final DQLIntegrateTestCaseAssertion assertion;
public AdditionalDQLIntegrateTest(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public AdditionalDQLIT(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
}
......
......@@ -22,7 +22,7 @@ import org.apache.shardingsphere.dbtest.cases.dataset.DataSet;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetColumn;
import org.apache.shardingsphere.dbtest.cases.dataset.metadata.DataSetMetadata;
import org.apache.shardingsphere.dbtest.cases.dataset.row.DataSetRow;
import org.apache.shardingsphere.dbtest.engine.SingleIntegrateTest;
import org.apache.shardingsphere.dbtest.engine.SingleIT;
import org.apache.shardingsphere.dbtest.env.DatabaseTypeEnvironment;
import org.apache.shardingsphere.dbtest.env.EnvironmentPath;
import org.apache.shardingsphere.dbtest.env.IntegrateTestEnvironment;
......@@ -55,12 +55,12 @@ import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
public abstract class BaseDQLIntegrateTest extends SingleIntegrateTest {
public abstract class BaseDQLIT extends SingleIT {
private static IntegrateTestEnvironment integrateTestEnvironment = IntegrateTestEnvironment.getInstance();
public BaseDQLIntegrateTest(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public BaseDQLIT(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
}
......
......@@ -38,12 +38,12 @@ import java.util.Collection;
import static org.junit.Assert.assertTrue;
public final class GeneralDQLIntegrateTest extends BaseDQLIntegrateTest {
public final class GeneralDQLIT extends BaseDQLIT {
private final DQLIntegrateTestCaseAssertion assertion;
public GeneralDQLIntegrateTest(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
public GeneralDQLIT(final String sqlCaseId, final String path, final DQLIntegrateTestCaseAssertion assertion, final String shardingRuleType,
final DatabaseTypeEnvironment databaseTypeEnvironment, final SQLCaseType caseType) throws IOException, JAXBException, SQLException, ParseException {
super(sqlCaseId, path, assertion, shardingRuleType, databaseTypeEnvironment, caseType);
this.assertion = assertion;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册