You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "strongduanmu (via GitHub)" <gi...@apache.org> on 2023/05/12 10:58:58 UTC

[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #25617: Add deadlock in transaction E2E

strongduanmu commented on code in PR #25617:
URL: https://github.com/apache/shardingsphere/pull/25617#discussion_r1192222452


##########
test/e2e/operation/transaction/src/test/resources/env/mysql/my.cnf:
##########
@@ -25,3 +25,4 @@ binlog-row-image=full
 max_connections=600
 # for mysql 8.0
 secure_file_priv=/var/lib/mysql
+innodb_lock_wait_timeout=5

Review Comment:
   Please add new line here.



##########
test/e2e/operation/transaction/src/test/java/org/apache/shardingsphere/test/e2e/transaction/cases/base/BaseTransactionTestCase.java:
##########
@@ -119,4 +118,19 @@ protected int countWithLog(final Connection connection, final String sql) throws
         }
         return result;
     }
+    
+    protected void assertAccountBalances(final Connection connection, final int... expectedBalances) throws SQLException {
+        try (Statement statement = connection.createStatement()) {
+            ResultSet resultSet = statement.executeQuery("SELECT * FROM account");

Review Comment:
   Please add try resource clause for resultSet



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org