xtern commented on code in PR #1880: URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1165539011
########## modules/jdbc/src/integrationTest/java/org/apache/ignite/jdbc/ItJdbcBatchSelfTest.java: ########## @@ -636,6 +619,61 @@ public void testBatchClearPrepared() throws SQLException { assertEquals(0L, personsCount(), "Test table should be empty after empty batch is performed."); } + @Test + public void testTransactionalBatch() throws Exception { + conn.setAutoCommit(false); + + int rowsCnt = 5; + + Callable<int[]> batchOp = () -> { + for (int i = 0; i < rowsCnt; i++) { + stmt.addBatch("insert into Person (id, firstName, lastName, age) values " + valuesRow(i)); + } + + return stmt.executeBatch(); + }; + + // Check rollback. + checkBatchTxResult(rowsCnt, batchOp, false); + + // Check commit. + checkBatchTxResult(rowsCnt, batchOp, true); + } + + @Test + public void testTransactionalBatchPrepared() throws Exception { + conn.setAutoCommit(false); + + int rowsCnt = 5; + + Callable<int[]> batchOp = () -> { + populatePrepared(rowsCnt); + + return pstmt.executeBatch(); Review Comment: This test case is now covered by integration tests. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org