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



##########
File path: 
ratis-test/src/test/java/org/apache/ratis/datastream/DataStreamAsyncClusterTests.java
##########
@@ -69,12 +69,29 @@ public void testMultipleStreamsMultipleServers() throws 
Exception {
     RaftServerConfigKeys.Rpc.setTimeoutMax(getProperties(), max);
   }
 
+  @Test
+  public void testSingleStreamMultipleServersStepDownLeader() throws Exception 
{
+    runWithNewCluster(3, this::runTestDataStreamStepDownLeader);
+  }
+
+  void runTestDataStreamStepDownLeader(CLUSTER cluster) throws Exception {
+    runTestDataStream(cluster, true);
+  }
+
   void runTestDataStream(CLUSTER cluster) throws Exception {
+    runTestDataStream(cluster, false);
+  }
+
+  void runTestDataStream(CLUSTER cluster, boolean stepDownLeader) throws 
Exception {
     RaftTestUtil.waitForLeader(cluster);
 
     final List<CompletableFuture<Long>> futures = new ArrayList<>();
-    futures.add(CompletableFuture.supplyAsync(() -> runTestDataStream(cluster, 
5, 10, 1_000_000, 10), executor));
-    futures.add(CompletableFuture.supplyAsync(() -> runTestDataStream(cluster, 
2, 20, 1_000, 10_000), executor));
+    if (stepDownLeader) {
+      futures.add(CompletableFuture.supplyAsync(() -> 
runTestDataStream(cluster, 1, 1, 1_000_000, 10, stepDownLeader), executor));

Review comment:
       @szetszwo The failed reason seems related with Isolate and deIsolate too 
many times. The root cause is hard to find. I will continue to find it.




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