zstan commented on code in PR #4149:
URL: https://github.com/apache/ignite-3/pull/4149#discussion_r1693165492


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java:
##########
@@ -452,27 +458,35 @@ public void testMergeKeysConflict() {
      * Test verifies that scan is executed within provided transaction.
      */
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-15081";)
     public void scanExecutedWithinGivenTransaction() {
         sql("CREATE TABLE test (id int primary key, val int)");
 
+        Transaction olderTx = CLUSTER.aliveNode().transactions().begin();
         Transaction tx = CLUSTER.aliveNode().transactions().begin();
 
         sql(tx, "INSERT INTO test VALUES (0, 0)");
 
         // just inserted row should be visible within the same transaction
         assertEquals(1, sql(tx, "select * from test").size());
 
-        Transaction anotherTx = CLUSTER.aliveNode().transactions().begin();
-
         // just inserted row should not be visible until related transaction 
is committed
-        assertEquals(0, sql(anotherTx, "select * from test").size());
+        assertEquals(0,
+                sql(CLUSTER.aliveNode().transactions().begin(new 
TransactionOptions().readOnly(true)), "select * from test").size());
+
+        CompletableFuture<Integer> selectFut = runAsync(() -> sql(olderTx, 
"select * from test").size());
+
+        assertFalse(selectFut.isDone());

Review Comment:
   assertThat(selectFut, willTimeoutIn(100, MILLISECONDS));



-- 
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]

Reply via email to