slfan1989 opened a new pull request, #1446: URL: https://github.com/apache/ratis/pull/1446
## What changes were proposed in this pull request? This pull request fixes a flaky assertion in `TestReadOnlyRequestWithGrpc.testReadAfterWrite`. The previous test sent multiple async writes without waiting for them to complete, then issued a linearizable read and a read-after-write request concurrently. It asserted that the read-after-write result should be greater than or equal to the concurrent linearizable read result. That assumption is unreliable because the two reads may have different linearization points and may observe different subsets of concurrent writes. This patch keeps the original async write workload and both read paths, but makes the test deterministic by: - waiting for the async writes to complete before issuing the reads; - verifying that both linearizable read and read-after-write observe the completed prior writes; - waiting for followers to catch up before cluster shutdown to avoid shutdown-time leak detection races. ## What is the link to the Apache JIRA RATIS-2514. Fix flaky TestReadOnlyRequestWithGrpc.testReadAfterWrite. ## How was this patch tested? ``` ./mvnw -pl ratis-test -am -Pgrpc-tests -Dtest=TestReadOnlyRequestWithGrpc#testReadAfterWrite 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]
