You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/11/18 00:53:54 UTC

[GitHub] [incubator-ratis] runzhiwang commented on a change in pull request #282: RATIS-1162. Enable testing clusters with Netty data stream and gRPC.

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 test 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:
users@infra.apache.org