Copilot commented on code in PR #6897:
URL: https://github.com/apache/ignite-3/pull/6897#discussion_r2491692980


##########
modules/catalog-compaction/src/integrationTest/java/org/apache/ignite/internal/catalog/compaction/ItCatalogCompactionTest.java:
##########
@@ -138,63 +144,82 @@ void testGlobalMinimumTxRequiredTime() {
         IgniteImpl node1 = unwrapIgniteImpl(CLUSTER.node(1));
         IgniteImpl node2 = unwrapIgniteImpl(CLUSTER.node(2));
 
+        DebugInfoCollector debug = new DebugInfoCollector(List.of(node0, 
node1, node2));
+
         List<CatalogCompactionRunner> compactors = List.of(
                 node0.catalogCompactionRunner(),
                 node1.catalogCompactionRunner(),
                 node2.catalogCompactionRunner()
         );
 
-        Catalog catalog1 = getLatestCatalog(node2);
+        debug.recordCatalogState("init");
+        debug.recordMinTxTimesState("init");
 
-        Transaction tx1 = beginTx(node0, false);
+        Catalog catalog1 = getLatestCatalog(node2);
+        InternalTransaction tx1 = beginTx(node0, false);
+        debug.recordTx(tx1);
 
         // Changing the catalog and starting transaction.
         sql("create table a(a int primary key)");
         Catalog catalog2 = getLatestCatalog(node0);
         assertThat(catalog2.version(), is(catalog1.version() + 1));
-        List<Transaction> txs2 = Stream.of(node1, node2).map(node -> 
beginTx(node, false)).collect(Collectors.toList());
+        List<InternalTransaction> txs2 = Stream.of(node1, node2).map(node -> 
beginTx(node, false)).collect(Collectors.toList());
         List<InternalTransaction> ignoredReadonlyTxs = Stream.of(node0, node1, 
node2)
                 .map(node -> beginTx(node, true))
                 .collect(Collectors.toList());
 
+        debug.recordTx(txs2);
+        debug.recordTx(ignoredReadonlyTxs);
+
         // Changing the catalog again and starting transaction.
         sql("alter table a add column (b int)");
 
-        Awaitility.await().untilAsserted(() -> 
assertThat(getLatestCatalogVersion(node1), is(catalog2.version() + 1)));
+        Awaitility.await().until(() -> getLatestCatalogVersion(node1), 
is(catalog2.version() + 1));

Review Comment:
   [nitpick] The changed assertion pattern using `Awaitility.await().until()` 
with a lambda and matcher is less readable than the original `untilAsserted()` 
approach. Consider keeping `untilAsserted(() -> 
assertThat(getLatestCatalogVersion(node1), is(catalog2.version() + 1)))` for 
consistency with other test patterns and better readability.
   ```suggestion
           Awaitility.await().untilAsserted(() -> 
assertThat(getLatestCatalogVersion(node1), is(catalog2.version() + 1)));
   ```



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