ygerzhedovich commented on code in PR #2611:
URL: https://github.com/apache/ignite-3/pull/2611#discussion_r1345829409


##########
modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcTransactionTest.java:
##########
@@ -240,6 +243,37 @@ public void testRollbackInAutoCommitMode() throws 
SQLException  {
         }
     }
 
+    /**
+     * Ensure that explicit transaction can not be used, after it encounters 
an error.
+     */
+    @Disabled("https://issues.apache.org/jira/browse/IGNITE-20534";)
+    @ParameterizedTest
+    @CsvSource({
+            // dml or not | SQL statement
+            "true,insert into TEST (ID) values (2)",
+            "false,SELECT * FROM test",
+    })
+    public void testOperationsFailsWhenTransactionEncoutersAnError(boolean 
dml, String sqlStmt) throws SQLException {
+        try (Connection conn = DriverManager.getConnection(URL)) {
+            conn.setAutoCommit(false);
+
+            try (Statement stmt = conn.createStatement()) {
+                assertThrowsSqlException(SQLException.class, () -> 
stmt.executeQuery("SELECT 1/0").next());
+
+                assertThrowsSqlException(SQLException.class, "Transaction is 
already finished",

Review Comment:
   the same



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to