yuqi1129 commented on code in PR #8862:
URL: https://github.com/apache/gravitino/pull/8862#discussion_r2446526652


##########
core/src/test/java/org/apache/gravitino/cache/TestCacheConfig.java:
##########
@@ -152,22 +152,40 @@ void testPolicyAndTagCacheWeigher() throws 
InterruptedException {
           List.of(fileset));
     }
 
-    Thread.sleep(1000);
+    // Force cache cleanup to trigger eviction synchronously
+    cache.cleanUp();
 
-    // There should no tag entities in the cache, because the weight of each 
tag entity is 100 that
-    // is higher than the maximum weight of the fileset entity which is 200.
-    Awaitility.await()
-        .atMost(Duration.ofSeconds(5))

Review Comment:
   I was aware that the eviction is asynchronous, and the time it takes depends 
on the machine perfomance, however there should be a value that fits on a 
single-core machine.



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