runzhiwang commented on a change in pull request #282:
URL: https://github.com/apache/incubator-ratis/pull/282#discussion_r525623807



##########
File path: 
ratis-netty/src/test/java/org/apache/ratis/netty/MiniRaftClusterWithNetty.java
##########
@@ -30,12 +31,16 @@
 
 import java.io.IOException;
 
+/**
+ * A {@link MiniRaftCluster} with {{@link SupportedRpcType#NETTY}} and {@link 
SupportedDataStreamType#NETTY}.
+ */
 public class MiniRaftClusterWithNetty extends MiniRaftCluster.RpcBase {
   public static final Factory<MiniRaftClusterWithNetty> FACTORY
       = new Factory<MiniRaftClusterWithNetty>() {
     @Override
     public MiniRaftClusterWithNetty newCluster(String[] ids, RaftProperties 
prop) {
       RaftConfigKeys.Rpc.setType(prop, SupportedRpcType.NETTY);
+      RaftConfigKeys.DataStream.setType(prop, SupportedDataStreamType.NETTY);

Review comment:
       @szetszwo Can we define `RaftConfigKeys.DataStream.setType(prop, 
SupportedDataStreamType.NETTY);` in the following code ? If we define it here, 
other tests use MiniRaftClusterWithNetty but  unrelated to data stream will 
also start data stream server.
   ```
   public class TestNettyDataStreamWithNettyCluster extends 
DataStreamClusterTests<MiniRaftClusterWithNetty>
       implements MiniRaftClusterWithNetty.FactoryGet {
     {
       RaftConfigKeys.DataStream.setType(getProperties(), 
SupportedDataStreamType.NETTY);
     }
   }
   ```




----------------------------------------------------------------
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]


Reply via email to