tkalkirill commented on code in PR #12981:
URL: https://github.com/apache/ignite/pull/12981#discussion_r3043388267


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalCompactionSwitchOnTest.java:
##########
@@ -69,57 +80,36 @@ public class WalCompactionSwitchOnTest extends 
GridCommonAbstractTest {
      */
     @Test
     public void testWalCompactionSwitch() throws Exception {
-        IgniteEx ex = startGrid(0);
+        IgniteEx n = startGrid(0);
+        n.cluster().state(ClusterState.ACTIVE);
 
-        ex.cluster().state(ClusterState.ACTIVE);
-
-        IgniteCache<Integer, Integer> cache = ex.getOrCreateCache(
+        IgniteCache<Integer, Integer> cache = n.getOrCreateCache(
             new CacheConfiguration<Integer, Integer>()
                     .setName("c1")
                     .setGroupName("g1")
                     .setCacheMode(CacheMode.PARTITIONED)
         );
 
-        for (int i = 0; i < 500; i++)
+        for (int i = 0; i < 10_000; i++)
             cache.put(i, i);
 
-        NodeFileTree ft = ex.context().pdsFolderResolver().fileTree();
-
         forceCheckpoint();
 
-        GridTestUtils.waitForCondition(new GridAbsPredicate() {
-            @Override public boolean apply() {
-                File[] archivedFiles = ft.walSegments();
-
-                return archivedFiles.length == 39;
-            }
-        }, 5000);
+        assertTrue(waitForCondition(() -> ft(grid(0)).walSegments().length >= 
10, 5_000, 32));
 
         stopGrid(0);
 
         compactionEnabled = true;
 
-        ex = startGrid(0);
-
-        ex.cluster().state(ClusterState.ACTIVE);
-
-        File archiveDir = 
ex.context().pdsFolderResolver().fileTree().walArchive();
-
-        GridTestUtils.waitForCondition(new GridAbsPredicate() {
-            @Override public boolean apply() {
-                File[] archivedFiles = 
archiveDir.listFiles(NodeFileTree::walCompactedSegment);
+        n = startGrid(0);
+        n.cluster().state(ClusterState.ACTIVE);

Review Comment:
   Without this line, it doesn't work.
   If you look at other tests, the pattern is the same.



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