rpuch commented on code in PR #10410:
URL: https://github.com/apache/ignite/pull/10410#discussion_r1036769978


##########
modules/core/src/test/java/org/apache/ignite/internal/metric/IoStatisticsSelfTest.java:
##########
@@ -145,28 +151,26 @@ private void ioStatGlobalPageTrackTest(boolean 
isPersistent) throws Exception {
         long physicalReadsCnt = physicalReads(mmgr, CACHE_GROUP, 
DEFAULT_CACHE_NAME, null);
 
         if (isPersistent)
-            Assert.assertTrue(physicalReadsCnt > 0);
+            Assert.assertThat(physicalReadsCnt, Matchers.greaterThan(0L));

Review Comment:
   If we import `assertThat` and `greaterThan` statically, then the assertion 
reads as a plain text (which is probably good for readability): 'assert that 
phisicalReadsCnt greater than 0`



##########
modules/core/src/test/java/org/apache/ignite/internal/metric/IoStatisticsSelfTest.java:
##########
@@ -190,9 +194,9 @@ private IgniteConfiguration getConfiguration(boolean 
isPersist) throws Exception
             DataStorageConfiguration dsCfg = new DataStorageConfiguration()
                 .setDefaultDataRegionConfiguration(
                     new DataRegionConfiguration()
-                        .setMaxSize(30L * 1024 * 1024)
-                        .setPersistenceEnabled(true))
-                .setWalMode(WALMode.LOG_ONLY);
+                        .setMaxSize(25 * MB)

Review Comment:
   Looks like this is THE change that fixes test flakiness. Looks like 30Mb 
produces a flaky test, but 25Mb does not. Could you please add a comment 
explaining why this value of 25Mb was chosen (is there a calculation that 
demonstrates that a test will be stable with 25Mb, or it's empirically chosen)?



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