Lalant commented on code in PR #7428:
URL: https://github.com/apache/ignite-3/pull/7428#discussion_r2711842369


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItPartitionTableStatsMetricTest.java:
##########
@@ -276,10 +280,43 @@ void reachMilestoneUpdateTest() {
         }
     }
 
+    @Test
+    void pendingWriteIntentsMetric() {
+        String tabName = "test_table_pending_wi";
+
+        sql(format("CREATE TABLE {}(id INT PRIMARY KEY, val INT) ZONE {};", 
tabName, ZONE_1_PART_NO_REPLICAS));
+
+        Transaction tx = CLUSTER.aliveNode().transactions().begin();
+
+        int inserts = 3;
+
+        try {
+            for (int i = 0; i < inserts; i++) {
+                sql(tx, format("INSERT INTO {} VALUES(?, ?);", tabName), i, i);
+            }
+
+            expectPendingWriteIntents(tabName, inserts);
+
+            // The writes are still uncommitted, so the modification counter 
must not change yet.
+            expectModsCount(tabName, 0);
+        } finally {
+            tx.commit();
+        }
+
+        expectPendingWriteIntents(tabName, 0);

Review Comment:
   expectPendingWriteIntents is a custom method which does use Awaitility.



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