[ 
https://issues.apache.org/jira/browse/IGNITE-27117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18041210#comment-18041210
 ] 

Pavel Pereslegin commented on IGNITE-27117:
-------------------------------------------

[~korlov], please take a look at the proposed changes.

> Sql. Investigate flaky failures of ItJdbcBatchSelfTest.testBatchException and 
> testBatchParseException
> -----------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-27117
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27117
>             Project: Ignite
>          Issue Type: Bug
>          Components: jdbc ai3
>            Reporter: Pavel Pereslegin
>            Assignee: Pavel Pereslegin
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain, ignite-3
>             Fix For: 3.2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> With the new implementation of {{Statement.executeBatch}}, some old tests 
> have become unstable ({{testBatchException}} and {{testBatchParseException}}.
> Example:
> https://ci.ignite.apache.org/viewLog.html?buildId=9667373&buildTypeId=ApacheIgnite3x_Test_RunIntegrationTests&fromSakuraUI=true
> {noformat}
> java.lang.AssertionError: Error message
> Expected: a string containing "Invalid SQL statement type"
>      but: was "org.apache.ignite.sql.SqlException: IGN-SQL-6 The query was 
> cancelled while executing. TraceId:cb878371"
>       at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
>       at 
> org.apache.ignite.jdbc.util.JdbcTestUtils.assertThrowsSqlException(JdbcTestUtils.java:72)
>       at 
> org.apache.ignite.jdbc.ItJdbcBatchSelfTest.testBatchException(ItJdbcBatchSelfTest.java:311)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> {noformat}
> {{testBatchParseException}} fails for the same reason (probably) but with 
> another exception 
> {noformat}
> org.opentest4j.AssertionFailedError: Invalid update counts size ==> 
> Expected :5
> Actual   :4
>       at 
> org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
>       at 
> org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
>       at 
> org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
>       at 
> org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
>       at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:563)
>       at 
> org.apache.ignite.jdbc.ItJdbcBatchSelfTest.testBatchParseException(ItJdbcBatchSelfTest.java:350)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> {noformat}
> There is an assumption that the issue is somewhere inside multistatement 
> handler.
> This is only related to Statement.executeBatch (not 
> PreparedStatement.executeBatch).
> The issue is 100% reproducible if you add a small delay to 
> {{ClientSqlCursorNextResultRequest.process}} before 
> {{cur.requestNextAsync(pageSize)}} call.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to