CRZbulabula opened a new pull request, #1475: URL: https://github.com/apache/ratis/pull/1475
## What changes were proposed in this pull request? This PR stabilizes several timing-sensitive tests by replacing fixed sleeps or immediate assertions with waits for the concrete condition each test needs. The changes include: * Wait for restart futures before continuing to log assertions in `RaftBasicTests`. * Wait for commit index / state machine count in linearizable read tests instead of relying on fixed sleeps. * Wait for the transaction context map to become empty in `RaftLogTruncateTests`. * Pause the current leader before election stepDown and wait until a different leader is elected. * Allow more time for the install-snapshot follower next-index assertion on slow CI. ## Why are the changes needed? These tests can fail on slower CI machines when asynchronous restart, log cleanup, state machine application, leadership transition, or install snapshot progress completes later than the fixed delay assumed by the test. ## How was this patch tested? `mvn -pl ratis-server,ratis-test -am -Dtest=TestLinearizableReadRepliedIndexWithGrpc,ElectionCommandIntegrationTest,RaftLogTruncateTests test` `mvn -pl ratis-test -am -Dtest=TestRaftLogTruncateWithGrpc,TestElectionCommandIntegrationWithGrpc,TestInstallSnapshotNotificationWithGrpc,TestRaftWithGrpc 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]
