You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/11/12 04:27:51 UTC
[shardingsphere] branch master updated: Rename transaction test variable names (#22096)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 55a79ee80eb Rename transaction test variable names (#22096)
55a79ee80eb is described below
commit 55a79ee80eb3a7f7e4e81fd7bda8285a2951cf62
Author: ZhangCheng <fl...@outlook.com>
AuthorDate: Sat Nov 12 12:27:43 2022 +0800
Rename transaction test variable names (#22096)
---
.../cases/alterresource/AddResourceTestCase.java | 44 +++---
.../cases/alterresource/CloseResourceTestCase.java | 42 +++---
.../cases/autocommit/MySQLAutoCommitTestCase.java | 20 +--
.../autocommit/PostgresSQLAutoCommitTestCase.java | 18 +--
.../cases/base/BaseTransactionTestCase.java | 30 ++---
.../BroadcastTableTransactionTestCase.java | 34 ++---
.../ExceptionInTransactionTestCase.java | 22 +--
.../MultiOperationsCommitAndRollbackTestCase.java | 48 +++----
.../MultiTableCommitAndRollbackTestCase.java | 40 +++---
.../SingleTableCommitAndRollbackTestCase.java | 32 ++---
.../cases/cursor/OpenGaussCursorTestCase.java | 150 ++++++++++-----------
.../cases/nested/NestedTransactionTestCase.java | 22 +--
.../cases/readonly/MySQLSetReadOnlyTestCase.java | 12 +-
.../readonly/PostgreSQLSetReadOnlyTestCase.java | 12 +-
.../cases/readonly/SetReadOnlyTestCase.java | 12 +-
.../savepoint/OpenGaussSavePointTestCase.java | 8 +-
.../savepoint/PostgreSQLSavePointTestCase.java | 8 +-
.../cases/truncate/MySQLLocalTruncateTestCase.java | 40 +++---
.../cases/truncate/MySQLXATruncateTestCase.java | 20 +--
.../PostgresSQLAndOpenGaussTruncateTestCase.java | 44 +++---
.../engine/constants/TransactionTestConstants.java | 2 +-
...nsactionIT.java => MysqlJdbcTransactionIT.java} | 6 +-
...sactionIT.java => MysqlProxyTransactionIT.java} | 6 +-
...ionIT.java => PostgresqlJdbcTransactionIT.java} | 6 +-
...onIT.java => PostgresqlProxyTransactionIT.java} | 6 +-
.../env/enums/TransactionTestCaseRegistry.java | 16 +--
26 files changed, 350 insertions(+), 350 deletions(-)
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/AddResourceTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/AddResourceTestCase.java
index 07b1d2f8841..2fc094adec9 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/AddResourceTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/AddResourceTestCase.java
@@ -46,13 +46,13 @@ public final class AddResourceTestCase extends BaseTransactionTestCase {
}
private void assertAddResource() throws SQLException {
- Connection conn = getDataSource().getConnection();
- getBaseTransactionITCase().addResource(conn, "transaction_it_2");
- createThreeDataSourceAccountTableRule(conn);
- reCreateAccountTable(conn);
+ Connection connection = getDataSource().getConnection();
+ getBaseTransactionITCase().addResource(connection, "transaction_it_2");
+ createThreeDataSourceAccountTableRule(connection);
+ reCreateAccountTable(connection);
assertRollback();
assertCommit();
- conn.close();
+ connection.close();
}
private void createThreeDataSourceAccountTableRule(final Connection connection) throws SQLException {
@@ -62,28 +62,28 @@ public final class AddResourceTestCase extends BaseTransactionTestCase {
assertThat(ruleCount, is(3));
}
- private void reCreateAccountTable(final Connection conn) throws SQLException {
- getBaseTransactionITCase().dropAccountTable(conn);
- getBaseTransactionITCase().createAccountTable(conn);
+ private void reCreateAccountTable(final Connection connection) throws SQLException {
+ getBaseTransactionITCase().dropAccountTable(connection);
+ getBaseTransactionITCase().createAccountTable(connection);
}
private void assertRollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
- conn.rollback();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
+ connection.rollback();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
}
private void assertCommit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
- conn.commit();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
+ connection.commit();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/CloseResourceTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/CloseResourceTestCase.java
index fde8e3adc40..d4685539f3f 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/CloseResourceTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/alterresource/CloseResourceTestCase.java
@@ -45,36 +45,36 @@ public final class CloseResourceTestCase extends BaseTransactionTestCase {
}
private void assertCloseResource() throws SQLException {
- Connection conn = getDataSource().getConnection();
- getBaseTransactionITCase().createOriginalAccountTableRule(conn);
- reCreateAccountTable(conn);
+ Connection connection = getDataSource().getConnection();
+ getBaseTransactionITCase().createOriginalAccountTableRule(connection);
+ reCreateAccountTable(connection);
assertRollback();
assertCommit();
- conn.close();
+ connection.close();
}
- private void reCreateAccountTable(final Connection conn) throws SQLException {
- getBaseTransactionITCase().dropAccountTable(conn);
- getBaseTransactionITCase().createAccountTable(conn);
+ private void reCreateAccountTable(final Connection connection) throws SQLException {
+ getBaseTransactionITCase().dropAccountTable(connection);
+ getBaseTransactionITCase().createAccountTable(connection);
}
private void assertRollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
- conn.rollback();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
+ connection.rollback();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
}
private void assertCommit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
- conn.commit();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 6);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, BALANCE, TRANSACTION_ID) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6);");
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
+ connection.commit();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 6);
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/MySQLAutoCommitTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/MySQLAutoCommitTestCase.java
index 14a6efd2c78..2847c911045 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/MySQLAutoCommitTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/MySQLAutoCommitTestCase.java
@@ -47,20 +47,20 @@ public final class MySQLAutoCommitTestCase extends BaseTransactionTestCase {
}
private void assertAutoCommit() throws SQLException {
- Connection conn1 = getDataSource().getConnection();
- Connection conn2 = getDataSource().getConnection();
- executeWithLog(conn1, "set session transaction isolation level read committed;");
- executeWithLog(conn2, "set session transaction isolation level read committed;");
- executeWithLog(conn1, "set autocommit=0;");
- executeWithLog(conn2, "begin;");
- executeWithLog(conn1, "insert into account(id, balance, transaction_id) values(1, 100, 1)");
- ResultSet emptyResultSet = executeQueryWithLog(conn2, "select * from account;");
+ Connection connection1 = getDataSource().getConnection();
+ Connection connection2 = getDataSource().getConnection();
+ executeWithLog(connection1, "set session transaction isolation level read committed;");
+ executeWithLog(connection2, "set session transaction isolation level read committed;");
+ executeWithLog(connection1, "set autocommit=0;");
+ executeWithLog(connection2, "begin;");
+ executeWithLog(connection1, "insert into account(id, balance, transaction_id) values(1, 100, 1)");
+ ResultSet emptyResultSet = executeQueryWithLog(connection2, "select * from account;");
if (emptyResultSet.next()) {
fail("There should not be result.");
}
- executeWithLog(conn1, "commit;");
+ executeWithLog(connection1, "commit;");
ThreadUtil.sleep(1, TimeUnit.SECONDS);
- ResultSet notEmptyResultSet = executeQueryWithLog(conn2, "select * from account");
+ ResultSet notEmptyResultSet = executeQueryWithLog(connection2, "select * from account");
if (!notEmptyResultSet.next()) {
fail("There should be result.");
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/PostgresSQLAutoCommitTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/PostgresSQLAutoCommitTestCase.java
index 20b17c64c14..db7945b648f 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/PostgresSQLAutoCommitTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/autocommit/PostgresSQLAutoCommitTestCase.java
@@ -47,21 +47,21 @@ public final class PostgresSQLAutoCommitTestCase extends BaseTransactionTestCase
}
private void assertAutoCommit() throws SQLException {
- Connection conn1 = getDataSource().getConnection();
- Connection conn2 = getDataSource().getConnection();
- executeWithLog(conn1, "begin;");
- executeWithLog(conn2, "begin;");
- executeWithLog(conn1, "insert into account(id, balance, transaction_id) values(1, 100, 1)");
- ResultSet emptyResultSet = executeQueryWithLog(conn2, "select * from account;");
+ Connection connection1 = getDataSource().getConnection();
+ Connection connection2 = getDataSource().getConnection();
+ executeWithLog(connection1, "begin;");
+ executeWithLog(connection2, "begin;");
+ executeWithLog(connection1, "insert into account(id, balance, transaction_id) values(1, 100, 1)");
+ ResultSet emptyResultSet = executeQueryWithLog(connection2, "select * from account;");
if (emptyResultSet.next()) {
fail("There should not be result.");
}
- executeWithLog(conn1, "commit;");
+ executeWithLog(connection1, "commit;");
ThreadUtil.sleep(1, TimeUnit.SECONDS);
- ResultSet notEmptyResultSet = executeQueryWithLog(conn2, "select * from account");
+ ResultSet notEmptyResultSet = executeQueryWithLog(connection2, "select * from account");
if (!notEmptyResultSet.next()) {
fail("There should be result.");
}
- executeWithLog(conn2, "commit;");
+ executeWithLog(connection2, "commit;");
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/base/BaseTransactionTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/base/BaseTransactionTestCase.java
index e33bebf398c..659dc773a0e 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/base/BaseTransactionTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/base/BaseTransactionTestCase.java
@@ -59,13 +59,13 @@ public abstract class BaseTransactionTestCase {
protected abstract void executeTest() throws SQLException;
protected void beforeTest() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- executeWithLog(conn, "delete from account;");
- executeWithLog(conn, "delete from t_order;");
- executeWithLog(conn, "delete from t_order_item;");
- conn.commit();
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ executeWithLog(connection, "delete from account;");
+ executeWithLog(connection, "delete from t_order;");
+ executeWithLog(connection, "delete from t_order_item;");
+ connection.commit();
+ connection.close();
}
protected void afterTest() throws SQLException {
@@ -86,12 +86,12 @@ public abstract class BaseTransactionTestCase {
return connection.createStatement().executeQuery(sql);
}
- protected static void assertAccountRowCount(final Connection conn, final int rowNum) throws SQLException {
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, rowNum);
+ protected static void assertAccountRowCount(final Connection connection, final int rowNum) throws SQLException {
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, rowNum);
}
- protected static void assertTableRowCount(final Connection conn, final String tableName, final int rowNum) throws SQLException {
- Statement statement = conn.createStatement();
+ protected static void assertTableRowCount(final Connection connection, final String tableName, final int rowNum) throws SQLException {
+ Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery("select * from " + tableName);
int resultSetCount = 0;
while (resultSet.next()) {
@@ -101,15 +101,15 @@ public abstract class BaseTransactionTestCase {
assertThat(String.format("Recode num assert error, expect: %s, actual: %s.", rowNum, resultSetCount), resultSetCount, is(rowNum));
}
- protected void executeSqlListWithLog(final Connection conn, final String... sqlList) throws SQLException {
+ protected void executeSqlListWithLog(final Connection connection, final String... sqlList) throws SQLException {
for (String each : sqlList) {
log.info("Connection execute: {}.", each);
- conn.createStatement().execute(each);
+ connection.createStatement().execute(each);
}
}
- protected int countWithLog(final Connection conn, final String sql) throws SQLException {
- Statement statement = conn.createStatement();
+ protected int countWithLog(final Connection connection, final String sql) throws SQLException {
+ Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(sql);
int result = 0;
while (rs.next()) {
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java
index bf3392045be..a888fc19883 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/BroadcastTableTransactionTestCase.java
@@ -58,28 +58,28 @@ public final class BroadcastTableTransactionTestCase extends BaseTransactionTest
}
private void init() throws SQLException {
- Connection conn = getDataSource().getConnection();
- executeWithLog(conn, "delete from t_address;");
- assertTableRowCount(conn, T_ADDRESS, 0);
+ Connection connection = getDataSource().getConnection();
+ executeWithLog(connection, "delete from t_address;");
+ assertTableRowCount(connection, T_ADDRESS, 0);
}
private void commit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- executeWithLog(conn, "delete from t_address;");
- assertTableRowCount(conn, T_ADDRESS, 0);
- executeWithLog(conn, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
- assertTableRowCount(conn, T_ADDRESS, 1);
- conn.commit();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ executeWithLog(connection, "delete from t_address;");
+ assertTableRowCount(connection, T_ADDRESS, 0);
+ executeWithLog(connection, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
+ assertTableRowCount(connection, T_ADDRESS, 1);
+ connection.commit();
}
private void rollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- executeWithLog(conn, "delete from t_address;");
- assertTableRowCount(conn, T_ADDRESS, 0);
- executeWithLog(conn, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
- assertTableRowCount(conn, T_ADDRESS, 1);
- conn.commit();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ executeWithLog(connection, "delete from t_address;");
+ assertTableRowCount(connection, T_ADDRESS, 0);
+ executeWithLog(connection, "INSERT INTO t_address (id, code, address) VALUES (1, '1', 'nanjing');");
+ assertTableRowCount(connection, T_ADDRESS, 1);
+ connection.commit();
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/ExceptionInTransactionTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/ExceptionInTransactionTestCase.java
index 306a51a20bd..c6312fb54a7 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/ExceptionInTransactionTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/ExceptionInTransactionTestCase.java
@@ -44,28 +44,28 @@ public final class ExceptionInTransactionTestCase extends BaseTransactionTestCas
@Override
protected void executeTest() throws SQLException {
- Connection conn = null;
+ Connection connection = null;
try {
- conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 0);
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
+ connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 0);
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
int causedExceptionResult = 1 / 0;
log.info("Caused exception result: {}", causedExceptionResult);
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
- conn.commit();
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
+ connection.commit();
fail("It should fail here.");
} catch (final ArithmeticException ex) {
assertThat(ex.getMessage(), is("/ by zero"));
} finally {
- if (null != conn) {
- conn.rollback();
+ if (null != connection) {
+ connection.rollback();
}
}
Thread queryThread = new Thread(() -> {
log.info("Execute query in new thread.");
- try (Connection connection = getDataSource().getConnection()) {
- assertAccountRowCount(connection, 0);
+ try (Connection connection2 = getDataSource().getConnection()) {
+ assertAccountRowCount(connection2, 0);
} catch (final SQLException ignored) {
}
});
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiOperationsCommitAndRollbackTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiOperationsCommitAndRollbackTestCase.java
index 0ef546588c0..014d8dd2c26 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiOperationsCommitAndRollbackTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiOperationsCommitAndRollbackTestCase.java
@@ -49,38 +49,38 @@ public final class MultiOperationsCommitAndRollbackTestCase extends BaseTransact
}
private void assertRollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
- executeUpdateWithLog(conn, "update account set balance = 3, transaction_id = 3 where id = 2;");
- assertQueryAccount(conn, 1, 3);
- conn.rollback();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- assertQueryAccount(conn, 1, 2);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
+ executeUpdateWithLog(connection, "update account set balance = 3, transaction_id = 3 where id = 2;");
+ assertQueryAccount(connection, 1, 3);
+ connection.rollback();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ assertQueryAccount(connection, 1, 2);
}
private void assertCommit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 0);
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
- executeUpdateWithLog(conn, "update account set balance = 3, transaction_id = 3 where id = 2;");
- assertQueryAccount(conn, 1, 3);
- conn.commit();
- assertTableRowCount(conn, TransactionTestConstants.ACCOUNT, 2);
- assertQueryAccount(conn, 1, 3);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 0);
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1);");
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(2, 2, 2);");
+ executeUpdateWithLog(connection, "update account set balance = 3, transaction_id = 3 where id = 2;");
+ assertQueryAccount(connection, 1, 3);
+ connection.commit();
+ assertTableRowCount(connection, TransactionTestConstants.ACCOUNT, 2);
+ assertQueryAccount(connection, 1, 3);
}
private void assertQueryAccount(final Connection conn, final int... expectedBalances) throws SQLException {
Preconditions.checkArgument(2 == expectedBalances.length);
Statement queryStatement = conn.createStatement();
- ResultSet rs = queryStatement.executeQuery("select * from account;");
- while (rs.next()) {
- int id = rs.getInt("id");
- int actualBalance = rs.getInt("balance");
+ ResultSet resultSet = queryStatement.executeQuery("select * from account;");
+ while (resultSet.next()) {
+ int id = resultSet.getInt("id");
+ int actualBalance = resultSet.getInt("balance");
if (1 == id) {
assertBalance(actualBalance, expectedBalances[0]);
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiTableCommitAndRollbackTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiTableCommitAndRollbackTestCase.java
index be10a7d9f23..978b153418a 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiTableCommitAndRollbackTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/MultiTableCommitAndRollbackTestCase.java
@@ -46,36 +46,36 @@ public final class MultiTableCommitAndRollbackTestCase extends BaseTransactionTe
}
private void assertRollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, T_ORDER, 0);
- assertTableRowCount(conn, T_ORDER_ITEM, 0);
- executeSqlListWithLog(conn,
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, T_ORDER, 0);
+ assertTableRowCount(connection, T_ORDER_ITEM, 0);
+ executeSqlListWithLog(connection,
"INSERT INTO t_order (order_id, user_id, status) VALUES (1, 1, '1');",
"INSERT INTO t_order (order_id, user_id, status) VALUES (2, 2, '2');",
"INSERT INTO t_order_item (item_id, order_id, user_id, status) VALUES (1, 1, 1, '1');",
"INSERT INTO t_order_item (item_id, order_id, user_id, status) VALUES (2, 2, 2, '2');");
- assertTableRowCount(conn, T_ORDER, 2);
- assertTableRowCount(conn, T_ORDER_ITEM, 2);
- conn.rollback();
- assertTableRowCount(conn, T_ORDER, 0);
- assertTableRowCount(conn, T_ORDER_ITEM, 0);
+ assertTableRowCount(connection, T_ORDER, 2);
+ assertTableRowCount(connection, T_ORDER_ITEM, 2);
+ connection.rollback();
+ assertTableRowCount(connection, T_ORDER, 0);
+ assertTableRowCount(connection, T_ORDER_ITEM, 0);
}
private void assertCommit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertTableRowCount(conn, T_ORDER, 0);
- assertTableRowCount(conn, T_ORDER_ITEM, 0);
- executeSqlListWithLog(conn,
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertTableRowCount(connection, T_ORDER, 0);
+ assertTableRowCount(connection, T_ORDER_ITEM, 0);
+ executeSqlListWithLog(connection,
"INSERT INTO t_order (order_id, user_id, status) VALUES (1, 1, '1');",
"INSERT INTO t_order (order_id, user_id, status) VALUES (2, 2, '2');",
"INSERT INTO t_order_item (item_id, order_id, user_id, status) VALUES (1, 1, 1, '1');",
"INSERT INTO t_order_item (item_id, order_id, user_id, status) VALUES (2, 2, 2, '2');");
- assertTableRowCount(conn, T_ORDER, 2);
- assertTableRowCount(conn, T_ORDER_ITEM, 2);
- conn.commit();
- assertTableRowCount(conn, T_ORDER, 2);
- assertTableRowCount(conn, T_ORDER_ITEM, 2);
+ assertTableRowCount(connection, T_ORDER, 2);
+ assertTableRowCount(connection, T_ORDER_ITEM, 2);
+ connection.commit();
+ assertTableRowCount(connection, T_ORDER, 2);
+ assertTableRowCount(connection, T_ORDER_ITEM, 2);
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/SingleTableCommitAndRollbackTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/SingleTableCommitAndRollbackTestCase.java
index 0091e050c19..8ef7e38f42b 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/SingleTableCommitAndRollbackTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/commitrollback/SingleTableCommitAndRollbackTestCase.java
@@ -43,24 +43,24 @@ public final class SingleTableCommitAndRollbackTestCase extends BaseTransactionT
}
private void assertRollback() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 0);
- Statement std1 = conn.createStatement();
- std1.execute("insert into account(id, balance, transaction_id) values(1, 1, 1);");
- assertAccountRowCount(conn, 1);
- conn.rollback();
- assertAccountRowCount(conn, 0);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 0);
+ Statement statement = connection.createStatement();
+ statement.execute("insert into account(id, balance, transaction_id) values(1, 1, 1);");
+ assertAccountRowCount(connection, 1);
+ connection.rollback();
+ assertAccountRowCount(connection, 0);
}
private void assertCommit() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 0);
- Statement std1 = conn.createStatement();
- std1.execute("insert into account(id, balance, transaction_id) values(1, 1, 1);");
- assertAccountRowCount(conn, 1);
- conn.commit();
- assertAccountRowCount(conn, 1);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 0);
+ Statement statement = connection.createStatement();
+ statement.execute("insert into account(id, balance, transaction_id) values(1, 1, 1);");
+ assertAccountRowCount(connection, 1);
+ connection.commit();
+ assertAccountRowCount(connection, 1);
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/cursor/OpenGaussCursorTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/cursor/OpenGaussCursorTestCase.java
index 121f7cfb717..c7310e715ff 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/cursor/OpenGaussCursorTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/cursor/OpenGaussCursorTestCase.java
@@ -58,101 +58,101 @@ public final class OpenGaussCursorTestCase extends BaseTransactionTestCase {
@Override
protected void beforeTest() throws SQLException {
super.beforeTest();
- Connection conn = getDataSource().getConnection();
- executeWithLog(conn, "CREATE OR REPLACE VIEW t_order_view AS SELECT * FROM t_order;");
+ Connection connection = getDataSource().getConnection();
+ executeWithLog(connection, "CREATE OR REPLACE VIEW t_order_view AS SELECT * FROM t_order;");
}
@Override
public void executeTest() throws SQLException {
- Connection conn = getDataSource().getConnection();
- broadcastTableCursorTest(conn);
- broadcastTableCursorTest2(conn);
- broadcastAndSingleTablesCursorTest(conn);
- broadcastAndSingleTablesCursorTest2(conn);
- viewCursorTest(conn);
+ Connection connection = getDataSource().getConnection();
+ broadcastTableCursorTest(connection);
+ broadcastTableCursorTest2(connection);
+ broadcastAndSingleTablesCursorTest(connection);
+ broadcastAndSingleTablesCursorTest2(connection);
+ viewCursorTest(connection);
}
- private void broadcastTableCursorTest(final Connection conn) throws SQLException {
- executeWithLog(conn, "start transaction;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor());
- executeWithLog(conn, "close test;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor());
- fetch(conn, 10101);
- fetch(conn, 10102);
- fetch(conn, 10201);
- fetch(conn, 10202);
- fetchOver(conn);
- fetchOver(conn);
- executeWithLog(conn, "rollback;");
+ private void broadcastTableCursorTest(final Connection connection) throws SQLException {
+ executeWithLog(connection, "start transaction;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor());
+ executeWithLog(connection, "close test;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor());
+ fetch(connection, 10101);
+ fetch(connection, 10102);
+ fetch(connection, 10201);
+ fetch(connection, 10202);
+ fetchOver(connection);
+ fetchOver(connection);
+ executeWithLog(connection, "rollback;");
}
- private void broadcastTableCursorTest2(final Connection conn) throws SQLException {
- executeWithLog(conn, "start transaction;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor2());
- executeWithLog(conn, "close test;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor2());
- fetch(conn, 10101);
- fetch(conn, 10102);
- fetch(conn, 10201);
- fetch(conn, 10202);
- fetchOver(conn);
- fetchOver(conn);
- executeWithLog(conn, "rollback;");
+ private void broadcastTableCursorTest2(final Connection connection) throws SQLException {
+ executeWithLog(connection, "start transaction;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor2());
+ executeWithLog(connection, "close test;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor2());
+ fetch(connection, 10101);
+ fetch(connection, 10102);
+ fetch(connection, 10201);
+ fetch(connection, 10202);
+ fetchOver(connection);
+ fetchOver(connection);
+ executeWithLog(connection, "rollback;");
}
- private void broadcastAndSingleTablesCursorTest(final Connection conn) throws SQLException {
- executeWithLog(conn, "start transaction;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastAndSingleTablesCursor());
- executeWithLog(conn, "close test;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastAndSingleTablesCursor());
- fetch(conn, 1);
- fetch(conn, 2);
- fetch(conn, 3);
- fetch(conn, 4);
- fetchOver(conn);
- fetchOver(conn);
- executeWithLog(conn, "rollback;");
+ private void broadcastAndSingleTablesCursorTest(final Connection connection) throws SQLException {
+ executeWithLog(connection, "start transaction;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastAndSingleTablesCursor());
+ executeWithLog(connection, "close test;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastAndSingleTablesCursor());
+ fetch(connection, 1);
+ fetch(connection, 2);
+ fetch(connection, 3);
+ fetch(connection, 4);
+ fetchOver(connection);
+ fetchOver(connection);
+ executeWithLog(connection, "rollback;");
}
- private void broadcastAndSingleTablesCursorTest2(final Connection conn) throws SQLException {
- executeWithLog(conn, "start transaction;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor2());
- executeWithLog(conn, "close test;");
- executeWithLog(conn, cursorSQLCommand.getBroadcastTablesCursor2());
- fetch(conn, 10101);
- fetch(conn, 10102);
- fetch(conn, 10201);
- fetch(conn, 10202);
- fetchOver(conn);
- fetchOver(conn);
- executeWithLog(conn, "rollback;");
+ private void broadcastAndSingleTablesCursorTest2(final Connection connection) throws SQLException {
+ executeWithLog(connection, "start transaction;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor2());
+ executeWithLog(connection, "close test;");
+ executeWithLog(connection, cursorSQLCommand.getBroadcastTablesCursor2());
+ fetch(connection, 10101);
+ fetch(connection, 10102);
+ fetch(connection, 10201);
+ fetch(connection, 10202);
+ fetchOver(connection);
+ fetchOver(connection);
+ executeWithLog(connection, "rollback;");
}
- private void viewCursorTest(final Connection conn) throws SQLException {
- executeWithLog(conn, "start transaction;");
- executeWithLog(conn, cursorSQLCommand.getViewCursor());
- executeWithLog(conn, "close test;");
- executeWithLog(conn, cursorSQLCommand.getViewCursor());
- fetch(conn, 1);
- fetch(conn, 2);
- fetch(conn, 3);
- fetch(conn, 4);
- fetchOver(conn);
- fetchOver(conn);
- executeWithLog(conn, "rollback;");
+ private void viewCursorTest(final Connection connection) throws SQLException {
+ executeWithLog(connection, "start transaction;");
+ executeWithLog(connection, cursorSQLCommand.getViewCursor());
+ executeWithLog(connection, "close test;");
+ executeWithLog(connection, cursorSQLCommand.getViewCursor());
+ fetch(connection, 1);
+ fetch(connection, 2);
+ fetch(connection, 3);
+ fetch(connection, 4);
+ fetchOver(connection);
+ fetchOver(connection);
+ executeWithLog(connection, "rollback;");
}
- private void fetch(final Connection conn, final int expectedId) throws SQLException {
- ResultSet rs = executeQueryWithLog(conn, "fetch test;");
- while (rs.next()) {
- int id = rs.getInt("id");
+ private void fetch(final Connection connection, final int expectedId) throws SQLException {
+ ResultSet resultSet = executeQueryWithLog(connection, "fetch test;");
+ while (resultSet.next()) {
+ int id = resultSet.getInt("id");
assertThat(id, is(expectedId));
}
}
- private void fetchOver(final Connection conn) throws SQLException {
- ResultSet rs = executeQueryWithLog(conn, "fetch test;");
- while (rs.next()) {
+ private void fetchOver(final Connection connection) throws SQLException {
+ ResultSet resultSet = executeQueryWithLog(connection, "fetch test;");
+ while (resultSet.next()) {
fail("Expected fetch nothing.");
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/nested/NestedTransactionTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/nested/NestedTransactionTestCase.java
index e584836e647..86242a67150 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/nested/NestedTransactionTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/nested/NestedTransactionTestCase.java
@@ -40,20 +40,20 @@ public class NestedTransactionTestCase extends BaseTransactionTestCase {
@Override
protected void executeTest() throws SQLException {
- ShardingSphereConnection conn1 = (ShardingSphereConnection) getDataSource().getConnection();
- Assert.assertFalse(conn1.isHoldTransaction());
- conn1.setAutoCommit(false);
- Assert.assertTrue(conn1.isHoldTransaction());
+ ShardingSphereConnection connection = (ShardingSphereConnection) getDataSource().getConnection();
+ Assert.assertFalse(connection.isHoldTransaction());
+ connection.setAutoCommit(false);
+ Assert.assertTrue(connection.isHoldTransaction());
requiresNewTransaction();
- Assert.assertTrue(conn1.isHoldTransaction());
- conn1.commit();
+ Assert.assertTrue(connection.isHoldTransaction());
+ connection.commit();
}
private void requiresNewTransaction() throws SQLException {
- ShardingSphereConnection conn2 = (ShardingSphereConnection) getDataSource().getConnection();
- Assert.assertFalse(conn2.isHoldTransaction());
- conn2.setAutoCommit(false);
- Assert.assertTrue(conn2.isHoldTransaction());
- conn2.commit();
+ ShardingSphereConnection connection = (ShardingSphereConnection) getDataSource().getConnection();
+ Assert.assertFalse(connection.isHoldTransaction());
+ connection.setAutoCommit(false);
+ Assert.assertTrue(connection.isHoldTransaction());
+ connection.commit();
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/MySQLSetReadOnlyTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/MySQLSetReadOnlyTestCase.java
index d47ccef4bae..1d489442692 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/MySQLSetReadOnlyTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/MySQLSetReadOnlyTestCase.java
@@ -46,13 +46,13 @@ public final class MySQLSetReadOnlyTestCase extends SetReadOnlyTestCase {
}
private void assertSetReadOnly() throws SQLException {
- Connection connection = getDataSource().getConnection();
- executeUpdateWithLog(connection, "insert into account(id, balance) values (1, 0), (2, 100);");
- Connection conn = getDataSource().getConnection();
- conn.setReadOnly(true);
- assertQueryBalance(conn);
+ Connection connection1 = getDataSource().getConnection();
+ executeUpdateWithLog(connection1, "insert into account(id, balance) values (1, 0), (2, 100);");
+ Connection connection2 = getDataSource().getConnection();
+ connection2.setReadOnly(true);
+ assertQueryBalance(connection2);
try {
- executeWithLog(conn, "update account set balance = 100 where id = 2;");
+ executeWithLog(connection2, "update account set balance = 100 where id = 2;");
fail("Update ran successfully, should failed.");
} catch (SQLException e) {
log.info("Update failed for expect.");
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/PostgreSQLSetReadOnlyTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/PostgreSQLSetReadOnlyTestCase.java
index 0c87408e6e2..d519a11b846 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/PostgreSQLSetReadOnlyTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/PostgreSQLSetReadOnlyTestCase.java
@@ -45,13 +45,13 @@ public final class PostgreSQLSetReadOnlyTestCase extends SetReadOnlyTestCase {
}
private void assertSetReadOnly() throws SQLException {
- Connection connection = getDataSource().getConnection();
- executeUpdateWithLog(connection, "insert into account(id, balance) values (1, 0), (2, 100);");
- Connection conn = getDataSource().getConnection();
- conn.setReadOnly(true);
- assertQueryBalance(conn);
+ Connection connection1 = getDataSource().getConnection();
+ executeUpdateWithLog(connection1, "insert into account(id, balance) values (1, 0), (2, 100);");
+ Connection connection2 = getDataSource().getConnection();
+ connection2.setReadOnly(true);
+ assertQueryBalance(connection2);
try {
- executeWithLog(conn, "update account set balance = 100 where id = 2;");
+ executeWithLog(connection2, "update account set balance = 100 where id = 2;");
log.info("Using the driver of postgresql:42.4.1 expect to update successfully.");
} catch (SQLException e) {
Assert.fail("Update failed, should be successfully.");
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/SetReadOnlyTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/SetReadOnlyTestCase.java
index 7f053eb347f..4e4caab2278 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/SetReadOnlyTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/readonly/SetReadOnlyTestCase.java
@@ -39,10 +39,10 @@ public abstract class SetReadOnlyTestCase extends BaseTransactionTestCase {
}
void assertNotSetReadOnly() throws SQLException {
- Connection conn = getDataSource().getConnection();
- assertQueryBalance(conn);
- executeUpdateWithLog(conn, "update account set balance = 101 where id = 2;");
- ResultSet resultSet = executeQueryWithLog(conn, "select * from account where id = 2");
+ Connection connection = getDataSource().getConnection();
+ assertQueryBalance(connection);
+ executeUpdateWithLog(connection, "update account set balance = 101 where id = 2;");
+ ResultSet resultSet = executeQueryWithLog(connection, "select * from account where id = 2");
if (!resultSet.next()) {
fail("Should have a result.");
}
@@ -50,8 +50,8 @@ public abstract class SetReadOnlyTestCase extends BaseTransactionTestCase {
assertThat(String.format("Balance is %s, should be 101.", balanceResult), balanceResult, is(101));
}
- void assertQueryBalance(final Connection conn) throws SQLException {
- ResultSet resultSet = executeQueryWithLog(conn, "select * from account;");
+ void assertQueryBalance(final Connection connection) throws SQLException {
+ ResultSet resultSet = executeQueryWithLog(connection, "select * from account;");
while (resultSet.next()) {
int id = resultSet.getInt("id");
int balance = resultSet.getInt("balance");
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/OpenGaussSavePointTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/OpenGaussSavePointTestCase.java
index 246046dfb28..9829bdea494 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/OpenGaussSavePointTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/OpenGaussSavePointTestCase.java
@@ -49,21 +49,21 @@ public final class OpenGaussSavePointTestCase extends BaseSavePointTestCase {
}
private void assertErrors() throws SQLException {
- Connection conn = getDataSource().getConnection();
+ Connection connection = getDataSource().getConnection();
try {
- conn.setSavepoint("point");
+ connection.setSavepoint("point");
fail("Expect exception, but no exception report.");
} catch (final SQLException ex) {
assertThat(ex.getMessage(), is("Cannot establish a savepoint in auto-commit mode."));
}
try {
- conn.rollback(new PSQLSavepoint("point1"));
+ connection.rollback(new PSQLSavepoint("point1"));
fail("Expect exception, but no exception report.");
} catch (final SQLException ex) {
assertTrue(ex.getMessage().endsWith("ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks"));
}
try {
- conn.releaseSavepoint(new PSQLSavepoint("point1"));
+ connection.releaseSavepoint(new PSQLSavepoint("point1"));
fail("Expect exception, but no exception report.");
} catch (final SQLException ex) {
assertTrue(ex.getMessage().endsWith("ERROR: RELEASE SAVEPOINT can only be used in transaction blocks"));
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/PostgreSQLSavePointTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/PostgreSQLSavePointTestCase.java
index 700a3b59211..cc937c1b1eb 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/PostgreSQLSavePointTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/savepoint/PostgreSQLSavePointTestCase.java
@@ -51,22 +51,22 @@ public final class PostgreSQLSavePointTestCase extends BaseSavePointTestCase {
@SneakyThrows(SQLException.class)
private void assertErrors() {
- Connection conn = getDataSource().getConnection();
+ Connection connection = getDataSource().getConnection();
try {
- conn.setSavepoint("point");
+ connection.setSavepoint("point");
fail("Expect exception, but no exception report.");
} catch (SQLException ex) {
assertThat(ex.getMessage(), is("Savepoint can only be used in transaction blocks."));
}
try {
- conn.rollback(new PSQLSavepoint("point1"));
+ connection.rollback(new PSQLSavepoint("point1"));
fail("Expect exception, but no exception report.");
} catch (SQLException ex) {
// TODO can not run to get the correct result in JDBC mode.
assertTrue(ex.getMessage().endsWith("ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks"));
}
try {
- conn.releaseSavepoint(new PSQLSavepoint("point1"));
+ connection.releaseSavepoint(new PSQLSavepoint("point1"));
fail("Expect exception, but no exception report.");
} catch (SQLException ex) {
// TODO can not run to get the correct result in JDBC mode.
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLLocalTruncateTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLLocalTruncateTestCase.java
index 4c254a81ff7..6da968b63fc 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLLocalTruncateTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLLocalTruncateTestCase.java
@@ -45,33 +45,33 @@ public final class MySQLLocalTruncateTestCase extends BaseTransactionTestCase {
private void assertTruncateRollback() throws SQLException {
prepare();
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 8);
- executeWithLog(conn, "truncate account;");
- assertAccountRowCount(conn, 0);
- conn.rollback();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 8);
+ executeWithLog(connection, "truncate account;");
+ assertAccountRowCount(connection, 0);
+ connection.rollback();
// Expected truncate operation cannot be rolled back in MySQL local transaction
- assertAccountRowCount(conn, 0);
- conn.close();
+ assertAccountRowCount(connection, 0);
+ connection.close();
}
private void assertTruncateCommit() throws SQLException {
prepare();
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 8);
- executeWithLog(conn, "truncate account;");
- assertAccountRowCount(conn, 0);
- conn.commit();
- assertAccountRowCount(conn, 0);
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 8);
+ executeWithLog(connection, "truncate account;");
+ assertAccountRowCount(connection, 0);
+ connection.commit();
+ assertAccountRowCount(connection, 0);
+ connection.close();
}
private void prepare() throws SQLException {
- Connection conn = getDataSource().getConnection();
- executeWithLog(conn, "delete from account;");
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ executeWithLog(connection, "delete from account;");
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
+ connection.close();
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java
index c149416b33f..f68cec094db 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/MySQLXATruncateTestCase.java
@@ -51,26 +51,26 @@ public final class MySQLXATruncateTestCase extends BaseTransactionTestCase {
private void assertTruncateInMySQLXATransaction() throws SQLException {
// TODO This test case may cause bad effects to other test cases in JDBC adapter
prepare();
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 8);
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 8);
try {
- conn.createStatement().execute("truncate account;");
+ connection.createStatement().execute("truncate account;");
fail("Expect exception, but no exception report.");
} catch (TableModifyInTransactionException ex) {
log.info("Exception for expected in Proxy: {}", ex.getMessage());
} catch (SQLException ex) {
log.info("Exception for expected in JDBC: {}", ex.getMessage());
} finally {
- conn.rollback();
- conn.close();
+ connection.rollback();
+ connection.close();
}
}
private void prepare() throws SQLException {
- Connection conn = getDataSource().getConnection();
- executeWithLog(conn, "delete from account;");
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ executeWithLog(connection, "delete from account;");
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
+ connection.close();
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/PostgresSQLAndOpenGaussTruncateTestCase.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/PostgresSQLAndOpenGaussTruncateTestCase.java
index acfd521cb9f..acd85324a49 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/PostgresSQLAndOpenGaussTruncateTestCase.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/cases/truncate/PostgresSQLAndOpenGaussTruncateTestCase.java
@@ -44,35 +44,35 @@ public final class PostgresSQLAndOpenGaussTruncateTestCase extends BaseTransacti
private void assertTruncateRollback() throws SQLException {
prepare();
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 8);
- executeWithLog(conn, "truncate account;");
- assertAccountRowCount(conn, 0);
- conn.rollback();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 8);
+ executeWithLog(connection, "truncate account;");
+ assertAccountRowCount(connection, 0);
+ connection.rollback();
// Expected truncate operation can be rolled back in PostgreSQL & OpenGauss
- assertAccountRowCount(conn, 8);
- conn.close();
+ assertAccountRowCount(connection, 8);
+ connection.close();
}
private void assertTruncateCommit() throws SQLException {
prepare();
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- assertAccountRowCount(conn, 8);
- executeWithLog(conn, "truncate account;");
- assertAccountRowCount(conn, 0);
- conn.commit();
- assertAccountRowCount(conn, 0);
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ assertAccountRowCount(connection, 8);
+ executeWithLog(connection, "truncate account;");
+ assertAccountRowCount(connection, 0);
+ connection.commit();
+ assertAccountRowCount(connection, 0);
+ connection.close();
}
private void prepare() throws SQLException {
- Connection conn = getDataSource().getConnection();
- conn.setAutoCommit(false);
- executeWithLog(conn, "delete from account;");
- executeWithLog(conn, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
- conn.commit();
- conn.close();
+ Connection connection = getDataSource().getConnection();
+ connection.setAutoCommit(false);
+ executeWithLog(connection, "delete from account;");
+ executeWithLog(connection, "insert into account(id, balance, transaction_id) values(1, 1, 1),(2, 2, 2),(3, 3, 3),(4, 4, 4),(5, 5, 5),(6, 6, 6),(7, 7, 7),(8, 8, 8);");
+ connection.commit();
+ connection.close();
}
}
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/constants/TransactionTestConstants.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/constants/TransactionTestConstants.java
index 10034b13da7..5db4511f329 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/constants/TransactionTestConstants.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/constants/TransactionTestConstants.java
@@ -26,7 +26,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TransactionTestConstants {
- public static final String MYSQL = "mysql";
+ public static final String MYSQL = "MySQL";
public static final String OPENGAUSS = "OpenGauss";
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLJdbcTransactionIT.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlJdbcTransactionIT.java
similarity index 91%
rename from test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLJdbcTransactionIT.java
rename to test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlJdbcTransactionIT.java
index a990f68a253..30b774e6de4 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLJdbcTransactionIT.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlJdbcTransactionIT.java
@@ -34,11 +34,11 @@ import java.util.Collection;
*/
@RunWith(Parameterized.class)
@Slf4j
-public final class MySQLJdbcTransactionIT extends BaseTransactionITCase {
+public final class MysqlJdbcTransactionIT extends BaseTransactionITCase {
private final TransactionParameterized parameterized;
- public MySQLJdbcTransactionIT(final TransactionParameterized parameterized) {
+ public MysqlJdbcTransactionIT(final TransactionParameterized parameterized) {
super(parameterized);
this.parameterized = parameterized;
log.info("Parameterized:{}", parameterized);
@@ -46,7 +46,7 @@ public final class MySQLJdbcTransactionIT extends BaseTransactionITCase {
@Parameters(name = "{0}")
public static Collection<TransactionParameterized> getParameters() {
- return getTransactionParameterizedList(MySQLJdbcTransactionIT.class);
+ return getTransactionParameterizedList(MysqlJdbcTransactionIT.class);
}
@After
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLProxyTransactionIT.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlProxyTransactionIT.java
similarity index 91%
rename from test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLProxyTransactionIT.java
rename to test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlProxyTransactionIT.java
index a98971b72e3..c18e152028c 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MySQLProxyTransactionIT.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/mysql/MysqlProxyTransactionIT.java
@@ -35,11 +35,11 @@ import java.util.Collection;
*/
@Slf4j
@RunWith(Parameterized.class)
-public final class MySQLProxyTransactionIT extends BaseTransactionITCase {
+public final class MysqlProxyTransactionIT extends BaseTransactionITCase {
private final TransactionParameterized parameterized;
- public MySQLProxyTransactionIT(final TransactionParameterized parameterized) {
+ public MysqlProxyTransactionIT(final TransactionParameterized parameterized) {
super(parameterized);
this.parameterized = parameterized;
log.info("Parameterized:{}", parameterized);
@@ -47,7 +47,7 @@ public final class MySQLProxyTransactionIT extends BaseTransactionITCase {
@Parameters(name = "{0}")
public static Collection<TransactionParameterized> getParameters() {
- return getTransactionParameterizedList(MySQLProxyTransactionIT.class);
+ return getTransactionParameterizedList(MysqlProxyTransactionIT.class);
}
@After
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLJdbcTransactionIT.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlJdbcTransactionIT.java
similarity index 91%
rename from test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLJdbcTransactionIT.java
rename to test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlJdbcTransactionIT.java
index cd6a94ee6dd..f0eea88fe53 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLJdbcTransactionIT.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlJdbcTransactionIT.java
@@ -35,11 +35,11 @@ import java.util.Collection;
*/
@Slf4j
@RunWith(Parameterized.class)
-public final class PostgreSQLJdbcTransactionIT extends BaseTransactionITCase {
+public final class PostgresqlJdbcTransactionIT extends BaseTransactionITCase {
private final TransactionParameterized parameterized;
- public PostgreSQLJdbcTransactionIT(final TransactionParameterized parameterized) {
+ public PostgresqlJdbcTransactionIT(final TransactionParameterized parameterized) {
super(parameterized);
this.parameterized = parameterized;
log.info("Parameterized:{}", parameterized);
@@ -47,7 +47,7 @@ public final class PostgreSQLJdbcTransactionIT extends BaseTransactionITCase {
@Parameters(name = "{0}")
public static Collection<TransactionParameterized> getParameters() {
- return getTransactionParameterizedList(PostgreSQLJdbcTransactionIT.class);
+ return getTransactionParameterizedList(PostgresqlJdbcTransactionIT.class);
}
@After
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLProxyTransactionIT.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlProxyTransactionIT.java
similarity index 91%
rename from test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLProxyTransactionIT.java
rename to test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlProxyTransactionIT.java
index bdb26918f8f..9c6795af48a 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgreSQLProxyTransactionIT.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/postgresql/PostgresqlProxyTransactionIT.java
@@ -35,11 +35,11 @@ import java.util.Collection;
*/
@Slf4j
@RunWith(Parameterized.class)
-public final class PostgreSQLProxyTransactionIT extends BaseTransactionITCase {
+public final class PostgresqlProxyTransactionIT extends BaseTransactionITCase {
private final TransactionParameterized parameterized;
- public PostgreSQLProxyTransactionIT(final TransactionParameterized parameterized) {
+ public PostgresqlProxyTransactionIT(final TransactionParameterized parameterized) {
super(parameterized);
this.parameterized = parameterized;
log.info("Parameterized:{}", parameterized);
@@ -47,7 +47,7 @@ public final class PostgreSQLProxyTransactionIT extends BaseTransactionITCase {
@Parameters(name = "{0}")
public static Collection<TransactionParameterized> getParameters() {
- return getTransactionParameterizedList(PostgreSQLProxyTransactionIT.class);
+ return getTransactionParameterizedList(PostgresqlProxyTransactionIT.class);
}
@After
diff --git a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/env/enums/TransactionTestCaseRegistry.java b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/env/enums/TransactionTestCaseRegistry.java
index 64a9f7dff74..bc4f8f4f649 100644
--- a/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/env/enums/TransactionTestCaseRegistry.java
+++ b/test/integration-test/transaction/src/test/java/org/apache/shardingsphere/integration/transaction/env/enums/TransactionTestCaseRegistry.java
@@ -21,12 +21,12 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.integration.transaction.engine.base.BaseTransactionITCase;
import org.apache.shardingsphere.integration.transaction.engine.constants.TransactionTestConstants;
-import org.apache.shardingsphere.integration.transaction.engine.mysql.MySQLJdbcTransactionIT;
-import org.apache.shardingsphere.integration.transaction.engine.mysql.MySQLProxyTransactionIT;
+import org.apache.shardingsphere.integration.transaction.engine.mysql.MysqlJdbcTransactionIT;
+import org.apache.shardingsphere.integration.transaction.engine.mysql.MysqlProxyTransactionIT;
import org.apache.shardingsphere.integration.transaction.engine.opengauss.OpenGaussJdbcTransactionIT;
import org.apache.shardingsphere.integration.transaction.engine.opengauss.OpenGaussProxyTransactionIT;
-import org.apache.shardingsphere.integration.transaction.engine.postgresql.PostgreSQLJdbcTransactionIT;
-import org.apache.shardingsphere.integration.transaction.engine.postgresql.PostgreSQLProxyTransactionIT;
+import org.apache.shardingsphere.integration.transaction.engine.postgresql.PostgresqlJdbcTransactionIT;
+import org.apache.shardingsphere.integration.transaction.engine.postgresql.PostgresqlProxyTransactionIT;
import org.apache.shardingsphere.test.integration.env.container.atomic.constants.AdapterContainerConstants;
/**
@@ -36,17 +36,17 @@ import org.apache.shardingsphere.test.integration.env.container.atomic.constants
@Getter
public enum TransactionTestCaseRegistry {
- MySQL_JDBC_IT(MySQLJdbcTransactionIT.class, TransactionTestConstants.MYSQL, AdapterContainerConstants.JDBC),
+ MySQL_JDBC_IT(MysqlJdbcTransactionIT.class, TransactionTestConstants.MYSQL, AdapterContainerConstants.JDBC),
- MySQL_PROXY_IT(MySQLProxyTransactionIT.class, TransactionTestConstants.MYSQL, AdapterContainerConstants.PROXY),
+ MySQL_PROXY_IT(MysqlProxyTransactionIT.class, TransactionTestConstants.MYSQL, AdapterContainerConstants.PROXY),
OPENGAUSS_JDBC_IT(OpenGaussJdbcTransactionIT.class, TransactionTestConstants.OPENGAUSS, AdapterContainerConstants.JDBC),
OPENGAUSS_PROXY_IT(OpenGaussProxyTransactionIT.class, TransactionTestConstants.OPENGAUSS, AdapterContainerConstants.PROXY),
- POSTGRESQL_JDBC_IT(PostgreSQLJdbcTransactionIT.class, TransactionTestConstants.POSTGRESQL, AdapterContainerConstants.JDBC),
+ POSTGRESQL_JDBC_IT(PostgresqlJdbcTransactionIT.class, TransactionTestConstants.POSTGRESQL, AdapterContainerConstants.JDBC),
- POSTGRESQL_PROXY_IT(PostgreSQLProxyTransactionIT.class, TransactionTestConstants.POSTGRESQL, AdapterContainerConstants.PROXY);
+ POSTGRESQL_PROXY_IT(PostgresqlProxyTransactionIT.class, TransactionTestConstants.POSTGRESQL, AdapterContainerConstants.PROXY);
private final Class<? extends BaseTransactionITCase> testCaseClass;