slfan1989 commented on code in PR #1446:
URL: https://github.com/apache/ratis/pull/1446#discussion_r3192577009
##########
ratis-server/src/test/java/org/apache/ratis/ReadOnlyRequestTests.java:
##########
@@ -299,20 +300,40 @@ private void testReadAfterWriteImpl(CLUSTER cluster)
throws Exception {
Assertions.assertEquals(1, retrieve(blockReply));
// test asynchronous read-after-write
- client.async().send(incrementMessage);
- client.async().sendReadAfterWrite(queryMessage).thenAccept(reply -> {
- Assertions.assertEquals(2, retrieve(reply));
- });
+ client.async().send(incrementMessage).get();
Review Comment:
@szetszwo Thanks for pointing this out! I agree that this test should
preserve the async write-then-read-after-write ordering; calling get() between
the two async calls would make the test ineffective for the intended
read-after-write semantics.
Given that `RATIS-1931_grpc-zero-copy` is currently far behind master, and
this area may already have been fixed or moved to LinearizableReadTests on
master, I agree the better next step is to merge/rebase from master first.
After syncing the branch, I will re-check whether the issue still exists before
making any local test changes.
--
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]