This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 7d852d7 Refactor BaseITCase (#15527)
7d852d7 is described below
commit 7d852d7fc995b6d26aa9f45db81cfaf4ac125fe3
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Feb 21 06:58:09 2022 +0800
Refactor BaseITCase (#15527)
* Remove useless code of ShardingSphereProxyContainer
* Refactor BaseITCase
* Refactor BaseITCase
---
.../test/integration/engine/BaseITCase.java | 38 +++-------------------
.../test/integration/engine/BatchITCase.java | 11 +++----
.../test/integration/engine/SingleITCase.java | 2 +-
.../test/integration/engine/dcl/GeneralDCLIT.java | 18 +++++++---
.../test/integration/engine/ddl/BaseDDLIT.java | 9 +++--
.../test/integration/engine/dml/BatchDMLIT.java | 4 +--
.../test/integration/engine/dql/BaseDQLIT.java | 5 ++-
.../test/integration/engine/ral/BaseRALIT.java | 9 +++--
.../test/integration/engine/rdl/BaseRDLIT.java | 9 +++--
.../adapter/impl/ShardingSphereProxyContainer.java | 1 -
.../compose/ComposedContainerRegistry.java | 6 +---
.../framework/param/model/ParameterizedArray.java | 23 +++++++++----
12 files changed, 66 insertions(+), 69 deletions(-)
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseITCase.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseITCase.java
index 1af771e..2208c5b 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseITCase.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BaseITCase.java
@@ -31,10 +31,6 @@ import org.junit.Before;
import org.junit.runner.RunWith;
import javax.sql.DataSource;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.sql.Statement;
import java.text.ParseException;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@@ -53,11 +49,11 @@ public abstract class BaseITCase {
private final String scenario;
- private final String adapter;
-
private final DatabaseType databaseType;
- private final IntegrationTestCase integrationTestCase;
+ private final String itKey;
+
+ private final IntegrationTestCase itCase;
private final ComposedContainer composedContainer;
@@ -66,10 +62,10 @@ public abstract class BaseITCase {
private DataSource targetDataSource;
public BaseITCase(final ParameterizedArray parameterizedArray) {
- adapter = parameterizedArray.getAdapter();
scenario = parameterizedArray.getScenario();
databaseType = parameterizedArray.getDatabaseType();
- integrationTestCase =
parameterizedArray.getTestCaseContext().getTestCase();
+ itKey = parameterizedArray.getKey();
+ itCase = parameterizedArray.getTestCaseContext().getTestCase();
composedContainer =
COMPOSED_CONTAINER_REGISTRY.getComposedContainer(parameterizedArray);
}
@@ -96,28 +92,4 @@ public abstract class BaseITCase {
}
protected abstract String getSQL() throws ParseException;
-
- protected void executeUpdateForStatement(final Connection connection,
final String sql) throws SQLException {
- try (Statement statement = connection.createStatement()) {
- statement.executeUpdate(sql);
- }
- }
-
- protected void executeUpdateForPrepareStatement(final Connection
connection, final String sql) throws SQLException {
- try (PreparedStatement preparedStatement =
connection.prepareStatement(sql)) {
- preparedStatement.executeUpdate();
- }
- }
-
- protected void executeForStatement(final Connection connection, final
String sql) throws SQLException {
- try (Statement statement = connection.createStatement()) {
- statement.execute(sql);
- }
- }
-
- protected void executeForPrepareStatement(final Connection connection,
final String sql) throws SQLException {
- try (PreparedStatement preparedStatement =
connection.prepareStatement(sql)) {
- preparedStatement.execute();
- }
- }
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BatchITCase.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BatchITCase.java
index e9ef1c9..362f063 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BatchITCase.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/BatchITCase.java
@@ -17,8 +17,6 @@
package org.apache.shardingsphere.test.integration.engine;
-import lombok.AccessLevel;
-import lombok.Getter;
import org.apache.shardingsphere.infra.datanode.DataNode;
import org.apache.shardingsphere.sharding.support.InlineExpressionParser;
import
org.apache.shardingsphere.test.integration.cases.assertion.IntegrationTestCaseAssertion;
@@ -51,7 +49,6 @@ import java.util.Set;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-@Getter(AccessLevel.PROTECTED)
public abstract class BatchITCase extends BaseITCase {
private final Collection<DataSet> dataSets = new LinkedList<>();
@@ -62,13 +59,13 @@ public abstract class BatchITCase extends BaseITCase {
public BatchITCase(final CaseParameterizedArray parameterizedArray) {
super(parameterizedArray);
- this.parentPath =
parameterizedArray.getTestCaseContext().getParentPath();
+ parentPath = parameterizedArray.getTestCaseContext().getParentPath();
}
@Before
public void init() throws Exception {
- for (IntegrationTestCaseAssertion each :
getIntegrationTestCase().getAssertions()) {
- dataSets.add(DataSetLoader.load(getParentPath(), getScenario(),
getDatabaseType(), each.getExpectedDataFile()));
+ for (IntegrationTestCaseAssertion each : getItCase().getAssertions()) {
+ dataSets.add(DataSetLoader.load(parentPath, getScenario(),
getDatabaseType(), each.getExpectedDataFile()));
}
dataSetEnvironmentManager = new DataSetEnvironmentManager(new
ScenarioPath(getScenario()).getDataSetFile(), getActualDataSourceMap());
dataSetEnvironmentManager.fillData();
@@ -76,7 +73,7 @@ public abstract class BatchITCase extends BaseITCase {
@Override
protected String getSQL() throws ParseException {
- return getIntegrationTestCase().getSql();
+ return getItCase().getSql();
}
@Override
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/SingleITCase.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/SingleITCase.java
index 07f4ece..b1599c5 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/SingleITCase.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/SingleITCase.java
@@ -53,7 +53,7 @@ public abstract class SingleITCase extends BaseITCase {
}
protected final String getSQL() throws ParseException {
- return sqlExecuteType == SQLExecuteType.Literal ?
getLiteralSQL(getIntegrationTestCase().getSql()) :
getIntegrationTestCase().getSql();
+ return sqlExecuteType == SQLExecuteType.Literal ?
getLiteralSQL(getItCase().getSql()) : getItCase().getSql();
}
protected final String getLiteralSQL(final String sql) throws
ParseException {
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dcl/GeneralDCLIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dcl/GeneralDCLIT.java
index ced3019..fe55d67 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dcl/GeneralDCLIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dcl/GeneralDCLIT.java
@@ -27,7 +27,9 @@ import org.junit.Test;
import org.junit.runners.Parameterized.Parameters;
import java.sql.Connection;
+import java.sql.PreparedStatement;
import java.sql.SQLException;
+import java.sql.Statement;
import java.text.ParseException;
import java.util.Collection;
@@ -48,9 +50,13 @@ public final class GeneralDCLIT extends BaseDCLIT {
String sql = getSQL();
try (Connection connection = getTargetDataSource().getConnection()) {
if (SQLExecuteType.Literal == getSqlExecuteType()) {
- executeUpdateForStatement(connection, sql);
+ try (Statement statement = connection.createStatement()) {
+ statement.executeUpdate(sql);
+ }
} else {
- executeUpdateForPrepareStatement(connection, sql);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(sql)) {
+ preparedStatement.executeUpdate();
+ }
}
}
}
@@ -60,9 +66,13 @@ public final class GeneralDCLIT extends BaseDCLIT {
String sql = getSQL();
try (Connection connection = getTargetDataSource().getConnection()) {
if (SQLExecuteType.Literal == getSqlExecuteType()) {
- executeForStatement(connection, sql);
+ try (Statement statement = connection.createStatement()) {
+ statement.execute(sql);
+ }
} else {
- executeForPrepareStatement(connection, sql);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(sql)) {
+ preparedStatement.execute();
+ }
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
index 4b4b03f..b6d3109 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java
@@ -30,6 +30,7 @@ import org.junit.Before;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
@@ -63,7 +64,9 @@ public abstract class BaseDDLIT extends SingleITCase {
public final void tearDown() throws Exception {
try (Connection connection = getTargetDataSource().getConnection()) {
String dropSql = String.format("DROP TABLE %s",
getAssertion().getInitialSQL().getAffectedTable());
- executeUpdateForPrepareStatement(connection, dropSql);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(dropSql)) {
+ preparedStatement.executeUpdate();
+ }
} catch (final SQLException | NoSuchTableException ignored) {
}
super.tearDown();
@@ -74,7 +77,9 @@ public abstract class BaseDDLIT extends SingleITCase {
return;
}
for (String each :
Splitter.on(";").trimResults().splitToList(getAssertion().getInitialSQL().getSql()))
{
- executeUpdateForPrepareStatement(connection, each);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(each)) {
+ preparedStatement.executeUpdate();
+ }
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
index dda768a..655a03f 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dml/BatchDMLIT.java
@@ -67,7 +67,7 @@ public final class BatchDMLIT extends BatchITCase {
private int[] executeBatchForPreparedStatement(final Connection
connection) throws SQLException, ParseException {
try (PreparedStatement preparedStatement =
connection.prepareStatement(getSQL())) {
- for (IntegrationTestCaseAssertion each :
getIntegrationTestCase().getAssertions()) {
+ for (IntegrationTestCaseAssertion each :
getItCase().getAssertions()) {
addBatch(preparedStatement, each);
}
return preparedStatement.executeBatch();
@@ -91,7 +91,7 @@ public final class BatchDMLIT extends BatchITCase {
}
try (Connection connection = getTargetDataSource().getConnection();
PreparedStatement preparedStatement =
connection.prepareStatement(getSQL())) {
- for (IntegrationTestCaseAssertion each :
getIntegrationTestCase().getAssertions()) {
+ for (IntegrationTestCaseAssertion each :
getItCase().getAssertions()) {
addBatch(preparedStatement, each);
}
preparedStatement.clearBatch();
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
index 8c9cd23..d164190 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/dql/BaseDQLIT.java
@@ -57,12 +57,11 @@ public abstract class BaseDQLIT extends SingleITCase {
}
private void fillDataOnlyOnce() throws SQLException, ParseException,
IOException, JAXBException {
- String key = String.join("-", getAdapter(), getScenario(),
getDatabaseType().getName());
- if (!FILLED_SUITES.contains(key)) {
+ if (!FILLED_SUITES.contains(getItKey())) {
synchronized (FILLED_SUITES) {
if (!FILLED_SUITES.contains(getScenario())) {
new DataSetEnvironmentManager(new
ScenarioPath(getScenario()).getDataSetFile(),
getActualDataSourceMap()).fillData();
- FILLED_SUITES.add(key);
+ FILLED_SUITES.add(getItKey());
}
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ral/BaseRALIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ral/BaseRALIT.java
index 626c1f9..0ae8d84 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ral/BaseRALIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ral/BaseRALIT.java
@@ -26,6 +26,7 @@ import
org.apache.shardingsphere.test.integration.framework.param.model.Assertio
import org.junit.Before;
import java.sql.Connection;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
@@ -67,7 +68,9 @@ public abstract class BaseRALIT extends SingleITCase {
return;
}
for (String each :
Splitter.on(";").trimResults().splitToList(getAssertion().getInitialSQL().getSql()))
{
- executeUpdateForPrepareStatement(connection, each);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(each)) {
+ preparedStatement.executeUpdate();
+ }
}
}
@@ -76,7 +79,9 @@ public abstract class BaseRALIT extends SingleITCase {
return;
}
for (String each :
Splitter.on(";").trimResults().splitToList(getAssertion().getDestroySQL().getSql()))
{
- executeUpdateForPrepareStatement(connection, each);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(each)) {
+ preparedStatement.executeUpdate();
+ }
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
index 76471bc..fc1e949 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
@@ -26,6 +26,7 @@ import
org.apache.shardingsphere.test.integration.framework.param.model.Assertio
import org.junit.Before;
import java.sql.Connection;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
@@ -67,7 +68,9 @@ public abstract class BaseRDLIT extends SingleITCase {
return;
}
for (String each :
Splitter.on(";").trimResults().splitToList(getAssertion().getInitialSQL().getSql()))
{
- executeUpdateForPrepareStatement(connection, each);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(each)) {
+ preparedStatement.executeUpdate();
+ }
}
}
@@ -76,7 +79,9 @@ public abstract class BaseRDLIT extends SingleITCase {
return;
}
for (String each :
Splitter.on(";").trimResults().splitToList(getAssertion().getDestroySQL().getSql()))
{
- executeUpdateForPrepareStatement(connection, each);
+ try (PreparedStatement preparedStatement =
connection.prepareStatement(each)) {
+ preparedStatement.executeUpdate();
+ }
}
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/adapter/impl/ShardingSphereProxyContainer.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/adapter/impl/ShardingSphereProxyContainer.java
index 0a5a264..247e5b1 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/adapter/impl/ShardingSphereProxyContainer.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/atomic/adapter/impl/ShardingSphereProxyContainer.java
@@ -69,7 +69,6 @@ public final class ShardingSphereProxyContainer extends
DockerITContainer implem
protected void configure() {
mapConfigurationFiles();
setWaitStrategy(new
LogMessageWaitStrategy().withRegEx(".*ShardingSphere-Proxy .* mode started
successfully.*"));
- super.configure();
}
private void mapConfigurationFiles() {
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
index 3b4db32..061c40b 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/container/compose/ComposedContainerRegistry.java
@@ -39,7 +39,7 @@ public final class ComposedContainerRegistry implements
AutoCloseable {
* @return composed container
*/
public ComposedContainer getComposedContainer(final ParameterizedArray
parameterizedArray) {
- String key = generateKey(parameterizedArray);
+ String key = parameterizedArray.getKey();
if (composedContainers.containsKey(key)) {
return composedContainers.get(key);
}
@@ -51,10 +51,6 @@ public final class ComposedContainerRegistry implements
AutoCloseable {
}
}
- private String generateKey(final ParameterizedArray parameterizedArray) {
- return String.join("-", parameterizedArray.getScenario(),
parameterizedArray.getAdapter(),
parameterizedArray.getDatabaseType().getName());
- }
-
private ComposedContainer createComposedContainer(final ParameterizedArray
parameterizedArray) {
return isMemoryMode(parameterizedArray) ? new
MemoryComposedContainer(parameterizedArray) : new
ClusterComposedContainer(parameterizedArray);
}
diff --git
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/param/model/ParameterizedArray.java
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/param/model/ParameterizedArray.java
index 71c0f7c..85bf016 100644
---
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/param/model/ParameterizedArray.java
+++
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/framework/param/model/ParameterizedArray.java
@@ -33,18 +33,18 @@ public interface ParameterizedArray {
IntegrationTestCaseContext getTestCaseContext();
/**
- * Get adapter.
- *
- * @return adapter
+ * Get scenario.
+ *
+ * @return scenario
*/
- String getAdapter();
+ String getScenario();
/**
- * Get scenario.
+ * Get adapter.
*
- * @return scenario
+ * @return adapter
*/
- String getScenario();
+ String getAdapter();
/**
* Get database type.
@@ -52,4 +52,13 @@ public interface ParameterizedArray {
* @return database type
*/
DatabaseType getDatabaseType();
+
+ /**
+ * Get key.
+ *
+ * @return key of parameterized array
+ */
+ default String getKey() {
+ return String.join("-", getScenario(), getAdapter(),
getDatabaseType().getName());
+ }
}