xianjingfeng commented on code in PR #276:
URL: https://github.com/apache/incubator-uniffle/pull/276#discussion_r1010398531


##########
integration-test/common/src/test/java/org/apache/uniffle/test/ShuffleServerFaultToleranceTest.java:
##########
@@ -0,0 +1,233 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.io.Files;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.roaringbitmap.longlong.Roaring64NavigableMap;
+
+import org.apache.uniffle.client.TestUtils;
+import org.apache.uniffle.client.api.ShuffleServerClient;
+import org.apache.uniffle.client.impl.grpc.ShuffleServerGrpcClient;
+import org.apache.uniffle.client.request.RssRegisterShuffleRequest;
+import org.apache.uniffle.client.request.RssSendShuffleDataRequest;
+import org.apache.uniffle.common.PartitionRange;
+import org.apache.uniffle.common.ShuffleBlockInfo;
+import org.apache.uniffle.common.ShuffleDataResult;
+import org.apache.uniffle.coordinator.CoordinatorConf;
+import org.apache.uniffle.coordinator.CoordinatorServer;
+import org.apache.uniffle.server.MockedShuffleServer;
+import org.apache.uniffle.server.ShuffleServer;
+import org.apache.uniffle.server.ShuffleServerConf;
+import org.apache.uniffle.server.buffer.ShuffleBuffer;
+import org.apache.uniffle.storage.handler.api.ClientReadHandler;
+import org.apache.uniffle.storage.handler.impl.ComposedClientReadHandler;
+import 
org.apache.uniffle.storage.handler.impl.LocalFileQuorumClientReadHandler;
+import org.apache.uniffle.storage.handler.impl.MemoryQuorumClientReadHandler;
+import org.apache.uniffle.storage.util.StorageType;
+
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.fail;
+
+public class ShuffleServerFaultToleranceTest extends ShuffleReadWriteBase {
+
+  private List<ShuffleServerClient> shuffleServerClients;
+
+  @BeforeAll
+  public static void setupServers() throws Exception {
+    CoordinatorConf coordinatorConf = getCoordinatorConf();
+    createCoordinatorServer(coordinatorConf);
+    shuffleServers.add(createServer(0));
+    shuffleServers.add(createServer(1));
+    shuffleServers.add(createServer(2));
+    startServers();
+  }
+
+  @BeforeEach
+  public void createClient() {
+    shuffleServerClients = new ArrayList<>();
+    for (ShuffleServer shuffleServer : shuffleServers) {
+      shuffleServerClients.add(new 
ShuffleServerGrpcClient(shuffleServer.getIp(), shuffleServer.getPort()));
+    }
+  }
+
+  @AfterEach
+  public void cleanEnv() throws Exception {
+    shuffleServerClients.forEach((client) -> {
+      client.close();
+    });
+    cleanCluster();
+    setupServers();
+  }
+
+  @Test
+  public void testReadFaultTolerance() throws Exception {
+    String testAppId = 
"ShuffleServerFaultToleranceTest.testReadFaultTolerance";

Review Comment:
   1. This case mainly tests whether we can read the complete data from 
`MemoryQuorumClientReadHandler` and `LocalFileQuorumClientReadHandler`  when 
the data of the first server is incomplete
   2. Three shuffle servers will be started here and blocks will only be send 
to the second server and third server every times
   3. Make sure read data from memory in the first time, and read data from 
localfile in the second time



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to