xtern commented on code in PR #2846:
URL: https://github.com/apache/ignite-3/pull/2846#discussion_r1406370966
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSqlMultiStatementTest.java:
##########
@@ -138,131 +126,76 @@ void
queryWithIncorrectNumberOfDynamicParametersFailsWithValidationError() {
assertThrowsSqlException(STMT_VALIDATION_ERR, expectedMessage, () ->
runScript(sql, null, 0, 1, 2, 3, 4, 5));
}
- @Test
- void transactionControlStatementDoesNotCreateCursor() {
- assertThat(runScript("START TRANSACTION; COMMIT"), nullValue());
-
- AsyncSqlCursor<List<Object>> cursor = runScript(
- "START TRANSACTION;"
- + "SELECT 1;"
- + "COMMIT"
- );
-
- assertNotNull(cursor);
- validateSingleResult(cursor, 1);
-
- assertFalse(cursor.hasNextResult());
- }
-
@Test
void scriptStopsExecutionOnError() {
// Runtime error.
- AsyncSqlCursor<List<Object>> cursor = runScript(
- "CREATE TABLE test (id INT PRIMARY KEY);"
- + "SELECT 2/0;" // Runtime error.
- + "INSERT INTO test VALUES (0)"
- );
- assertNotNull(cursor);
- assertTrue(cursor.hasNextResult());
+ {
+ AsyncSqlCursor<List<Object>> cursor = runScript(
+ "CREATE TABLE test (id INT PRIMARY KEY);"
+ + "SELECT 2/0;" // Runtime error.
+ + "INSERT INTO test VALUES (0)"
+ );
+ assertNotNull(cursor);
Review Comment:
Thanks. Removed all redundant null-checks that I found
--
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]