runzhiwang commented on a change in pull request #294:
URL: https://github.com/apache/incubator-ratis/pull/294#discussion_r528638515
##########
File path:
ratis-test/src/test/java/org/apache/ratis/datastream/DataStreamTestUtils.java
##########
@@ -76,18 +80,34 @@ static ByteString bytesWritten2ByteString(long
bytesWritten) {
@Override
public CompletableFuture<?> link(DataStream stream, LogEntryProto entry) {
- final SingleDataStream s =
getSingleDataStream(ClientInvocationId.valueOf(entry.getStateMachineLogEntry()));
- s.setLogEntry(entry);
+ LOG.info("link {}", stream);
+ if (stream == null) {
+ return JavaUtils.completeExceptionally(new IllegalStateException("Null
stream: entry=" + entry));
+ }
+ ((SingleDataStream)stream).setLogEntry(entry);
return CompletableFuture.completedFuture(null);
}
+ @Override
+ public CompletableFuture<Message> applyTransaction(TransactionContext trx)
{
Review comment:
@szetszwo Hi, sorry, why we need to override applyTransaction ? seems no
test need this.
----------------------------------------------------------------
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]