Phillippko commented on code in PR #7311:
URL: https://github.com/apache/ignite-3/pull/7311#discussion_r2647583102


##########
modules/index/src/integrationTest/java/org/apache/ignite/internal/index/ItIndexBuildCompletenessTest.java:
##########
@@ -113,13 +117,57 @@ void 
raceBetweenIndexBuildAndWriteFromDeadCoordinatorDoesNotCauseIndexIncomplete
                 .atMost(10, SECONDS)
                 .until(() -> 
isIndexAvailable(unwrapIgniteImpl(cluster.aliveNode()), INDEX_NAME));
 
-        assertThat(rowsInIndex(cluster.aliveNode()), is(transactions.size() - 
failedTransactions));
-        assertThat((long) rowsInIndex(cluster.aliveNode()), 
is(rowCountInTable()));
+        int successfulOperations = transactions.size() - failedOperations;
+
+        assertAll(
+                () -> assertThat(rowsInIndex(cluster.aliveNode()), 
is(successfulOperations)),
+                () -> assertThat((long) rowsInIndex(cluster.aliveNode()), 
is(rowCountInTable()))
+        );
     }
 
     private long rowCountInTable() {
         try (ResultSet<SqlRow> resultSet = 
cluster.aliveNode().sql().execute(null, "SELECT COUNT(*) FROM " + TABLE_NAME)) {
             return resultSet.next().longValue(0);
         }
     }
+
+    @Test
+    void 
raceBetweenIndexBuildAndWriteFromDeadCoordinatorDoesNotCauseIndexIncompletenessForImplicitTransactions()
 {
+        createTestTable(cluster, 1, 1);
+
+        createIndex(cluster, INDEX_NAME);
+
+        simulateCoordinatorLeaveToMakeIndexBuildStart();
+
+        CompletableFuture<Void> indexBuildCompleted = 
CompletableFuture.runAsync(() -> {

Review Comment:
   In other test we do operations and then wait for build. Here we go other way 
around. How is it a race then? Is it a typo? 



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