ygerzhedovich commented on code in PR #1469: URL: https://github.com/apache/ignite-3/pull/1469#discussion_r1082583163
########## modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItSqlAsynchronousApiTest.java: ########## @@ -343,37 +346,58 @@ public void checkTransactionsWithDml() throws Exception { assertEquals(txManagerInternal.finished(), states.size()); } - /** Check correctness of rw and ro transactions. */ + /** Check correctness of rw and ro transactions for table scan. */ @Test - public void checkMixedTransactions() throws Exception { + public void checkMixedTransactionsForTable() throws Exception { + sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)"); + + Matcher<String> planMatcher = containsTableScan("PUBLIC", "TEST"); + + checkMixedTransactions(planMatcher); + } + + + /** Check correctness of rw and ro transactions for index scan. */ + @Test + public void checkMixedTransactionsForIndex() throws Exception { + sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)"); + sql("CREATE INDEX TEST_IDX ON TEST(VAL0)"); + + Matcher<String> planMatcher = containsIndexScan("PUBLIC", "TEST", "TEST_IDX"); + + checkMixedTransactions(planMatcher); + } + + private void checkMixedTransactions(Matcher<String> planMatcher) throws Exception { IgniteSql sql = igniteSql(); if (sql instanceof ClientSql) { return; } - sql("CREATE TABLE TEST(ID INT PRIMARY KEY, VAL0 INT)"); - Session ses = sql.createSession(); for (int i = 0; i < ROW_COUNT; ++i) { sql("INSERT INTO TEST VALUES (?, ?)", i, i); } - checkTx(ses, true, false, true); - checkTx(ses, true, false, false); - checkTx(ses, true, true, true); - checkTx(ses, true, true, false); - checkTx(ses, false, true, true); - checkTx(ses, false, true, false); - checkTx(ses, false, false, true); - checkTx(ses, false, false, false); + for (int roTx = 0; roTx < 2; roTx++) { Review Comment: fixed -- 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