[ 
https://issues.apache.org/jira/browse/IGNITE-17998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin updated IGNITE-17998:
--------------------------------------
    Description: 
ItSqlAsynchronousApiTest#closeSession is unstable.
{noformat}
org.opentest4j.AssertionFailedError: Exception is neither of a specified class, 
nor has a cause of the specified class: class org.apache.ignite.sql.SqlException

        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:43)
        at org.junit.jupiter.api.Assertions.fail(Assertions.java:146)
        at 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:284)
        at 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:264)
        at 
org.apache.ignite.internal.sql.api.ItSqlAsynchronousApiTest.closeSession(ItSqlAsynchronousApiTest.java:541)
{noformat}
h3. {*}UPDATE{*}:

Since the test shows that the current behavior of "fetchNextPage" is unstable 
on a closed session, we decided to investigate other possible use-cases.
h4. The results are as follows:

The behavior of the "{{{}execute{}}}*" session methods on a closed session is 
correct - we throw a {{SqlException}} with the message "{{{}Session is 
closed{}}}" for any local execution.

"{{{}execute{}}}*" returns sync or async resultset. The "{{{}hasRowSet{}}} / 
{{affectedRows}} / {{wasApplied}} / {{metadata}} / {{{}close{}}}" methods are 
generic and give the expected results on a closed session with no errors.

The results of the rest of the methods are presented in the following table.
||ResultSet type||Method||Result|| ||
|| || ||*Data absent*||*Data present (pageSize=2)*||
|*{{async}}*|*{{CurrentPage}} (hasNext)*|{{false}}|{{true}}|
| |*{{currentPageSize}}*|0|2|
| |*{{hasMorePages}}*|false|true|
| |*{{fetchNextPage}}*|{{SqlException}} IGN-SQL-1 There are no more 
pages.|Expected: {{CursorClosedException}}
{color:#aa1111}Currently: {{No exception}} or {{CursorClosedException}} or 
{{ExecutionCancelledException}}{color}|
| | | | |
|*{{sync}}*|*{{hasNext}}*|{{false}}|{{true}}|
| |*next*|{{NoSuchElementException}}|{color:#676700}4 rows (2 pages) initially
then {{CursorClosedException}}
{{(dependent on "fetchNextPage" so currently similar unstable behavior is 
possible).}}{color}|

  was:
ItSqlAsynchronousApiTest#closeSession is unstable.
{noformat}
org.opentest4j.AssertionFailedError: Exception is neither of a specified class, 
nor has a cause of the specified class: class org.apache.ignite.sql.SqlException

        at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:43)
        at org.junit.jupiter.api.Assertions.fail(Assertions.java:146)
        at 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:284)
        at 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:264)
        at 
org.apache.ignite.internal.sql.api.ItSqlAsynchronousApiTest.closeSession(ItSqlAsynchronousApiTest.java:541)
{noformat}
h3. {*}UPDATE{*}:

Since the test shows that the current behavior of "fetchNextPage" is unstable 
on a closed session, we decided to investigate other possible use-cases.
h4. The results are as follows:

The behavior of the "{{{}execute{}}}*" session methods on a closed session is 
correct - we throw a {{SqlException}} with the message "{{{}Session is 
closed{}}}" for any local execution.

"{{{}execute{}}}*" returns sync or async resultset. The "{{{}hasRowSet{}}} / 
{{affectedRows}} / {{wasApplied}} / {{metadata}} / {{{}close{}}}" methods are 
generic and give the expected results on a closed session with no errors.

The results of the rest of the methods are presented in the following table.
||ResultSet type||Method||Result|| ||
|| || ||*Data absent*||*Data present (pageSize=2)*||
|*{{sync}}*|*{{hasNext}}*|{{false}}|{{true}}|
| |*next*|{{NoSuchElementException}}|{color:#676700}4 rows (2 pages) initially
then {{CursorClosedException}}
{{(dependent on "fetchNextPage" so currently similar unstable behavior is 
possible).}}{color}|
| | | | |
|*{{async}}*|*{{CurrentPage}} (hasNext)*|{{false}}|{{true}}|
| |*{{currentPageSize}}*|0|2|
| |*{{hasMorePages}}*|false|true|
| |*{{fetchNextPage}}*|{{SqlException}} IGN-SQL-1 There are no more 
pages.|Expected: {{CursorClosedException}}
{color:#aa1111}Currently: {{No exception}} or {{CursorClosedException}} or 
{{ExecutionCancelledException}}{color}|


> ItSqlAsynchronousApiTest#closeSession is unstable.
> --------------------------------------------------
>
>                 Key: IGNITE-17998
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17998
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-alpha5
>            Reporter: Evgeny Stanilovsky
>            Assignee: Pavel Pereslegin
>            Priority: Major
>              Labels: ignite-3
>
> ItSqlAsynchronousApiTest#closeSession is unstable.
> {noformat}
> org.opentest4j.AssertionFailedError: Exception is neither of a specified 
> class, nor has a cause of the specified class: class 
> org.apache.ignite.sql.SqlException
>       at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:43)
>       at org.junit.jupiter.api.Assertions.fail(Assertions.java:146)
>       at 
> org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:284)
>       at 
> org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause(IgniteTestUtils.java:264)
>       at 
> org.apache.ignite.internal.sql.api.ItSqlAsynchronousApiTest.closeSession(ItSqlAsynchronousApiTest.java:541)
> {noformat}
> h3. {*}UPDATE{*}:
> Since the test shows that the current behavior of "fetchNextPage" is unstable 
> on a closed session, we decided to investigate other possible use-cases.
> h4. The results are as follows:
> The behavior of the "{{{}execute{}}}*" session methods on a closed session is 
> correct - we throw a {{SqlException}} with the message "{{{}Session is 
> closed{}}}" for any local execution.
> "{{{}execute{}}}*" returns sync or async resultset. The "{{{}hasRowSet{}}} / 
> {{affectedRows}} / {{wasApplied}} / {{metadata}} / {{{}close{}}}" methods are 
> generic and give the expected results on a closed session with no errors.
> The results of the rest of the methods are presented in the following table.
> ||ResultSet type||Method||Result|| ||
> || || ||*Data absent*||*Data present (pageSize=2)*||
> |*{{async}}*|*{{CurrentPage}} (hasNext)*|{{false}}|{{true}}|
> | |*{{currentPageSize}}*|0|2|
> | |*{{hasMorePages}}*|false|true|
> | |*{{fetchNextPage}}*|{{SqlException}} IGN-SQL-1 There are no more 
> pages.|Expected: {{CursorClosedException}}
> {color:#aa1111}Currently: {{No exception}} or {{CursorClosedException}} or 
> {{ExecutionCancelledException}}{color}|
> | | | | |
> |*{{sync}}*|*{{hasNext}}*|{{false}}|{{true}}|
> | |*next*|{{NoSuchElementException}}|{color:#676700}4 rows (2 pages) initially
> then {{CursorClosedException}}
> {{(dependent on "fetchNextPage" so currently similar unstable behavior is 
> possible).}}{color}|



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

Reply via email to