runzhiwang commented on a change in pull request #243:
URL: https://github.com/apache/incubator-ratis/pull/243#discussion_r514969677
##########
File path:
ratis-test/src/test/java/org/apache/ratis/datastream/TestDataStreamBase.java
##########
@@ -65,8 +84,7 @@ public int write(ByteBuffer src) {
}
final int remaining = src.remaining();
for(; src.remaining() > 0; ) {
- Assert.assertEquals(pos2byte(byteWritten), src.get());
- byteWritten += 1;
+ Assert.assertEquals(pos2byte(byteWritten.getAndIncrement()),
src.get());
Review comment:
@szetszwo `public int write(ByteBuffer src) ` seems won't be called by
multi-thread in NettyServerStreamRpc currently ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]