amaliujia opened a new pull request, #1640: URL: https://github.com/apache/ratis/pull/1640
## What changes were proposed in this pull request? It seems that the cache eviction runs in a different thread so it may not run yet when hitting the assertion. We could follow existing testing practice to wait for it. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/RATIS-2746 https://github.com/apache/ratis/actions/runs/38516765616/job/115697213074?pr=1639 ``` [ERROR] org.apache.ratis.server.raftlog.segmented.TestCacheEviction.testEvictionInSegmentedLog – Time elapsed: 0.666 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: <4> but was: <7> at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:166) at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:161) at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:632) at org.apache.ratis.server.raftlog.segmented.TestCacheEviction.testEvictionInSegmentedLog(TestCacheEviction.java:191) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) ``` ## How was this patch tested? Existing test -- 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]
