zstan commented on code in PR #2611:
URL: https://github.com/apache/ignite-3/pull/2611#discussion_r1350364864
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItCommonApiTest.java:
##########
@@ -148,76 +138,4 @@ public void checkTimestampOperations() {
assertEquals(expDateTimeStr,
res.next().datetimeValue(1).toString());
}
}
-
- /** Check transaction change status with erroneous statements. */
- @Test
- public void testTxStateChangedOnErroneousOp() {
- sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)");
-
- TxManager txManager = txManager();
-
- SqlSchemaManager oldManager =
- (SqlSchemaManager)
IgniteTestUtils.getFieldValue(queryProcessor(), SqlQueryProcessor.class,
"sqlSchemaManager");
-
- Transaction tx = CLUSTER_NODES.get(0).transactions().begin();
-
- try {
- sql(tx, "INSERT INTO PUBLIC.TEST VALUES(1, 1)");
- sql(tx, "INSERT INTO NOTEXIST.TEST VALUES(1, 1)");
- } catch (Throwable ignore) {
- // No op.
- }
-
- assertEquals(1, txManager.pending());
- InternalTransaction tx0 = (InternalTransaction) tx;
- assertEquals(TxState.PENDING, tx0.state());
Review Comment:
changing here :
```
assertEquals(0, txManager.pending());
InternalTransaction tx0 = (InternalTransaction) tx;
assertEquals(TxState.ABORTED, tx0.state());
```
and test passed 50 times on my local, i found it helpful, i agree that
probably this is not good place to test internal states from SQL relational
tests, but we need to be sure that such kind of tests are present on TX side. I
think we need to return it, wdyt ?
--
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]