Skip to content

Commit de2fec6

Browse files
authored
RATIS-2219. Remove duplicate test case from TestRaftWithGrpc (#1192)
1 parent ee56932 commit de2fec6

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

ratis-test/src/test/java/org/apache/ratis/grpc/TestRaftWithGrpc.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@
3131
import org.apache.ratis.util.JavaUtils;
3232
import org.apache.ratis.util.TimeDuration;
3333
import org.junit.jupiter.api.Assertions;
34+
import org.junit.jupiter.api.Disabled;
3435
import org.junit.jupiter.params.ParameterizedTest;
35-
import org.junit.jupiter.params.provider.MethodSource;
36+
import org.junit.jupiter.params.provider.ValueSource;
3637

37-
import java.util.Arrays;
38-
import java.util.Collection;
3938
import java.util.concurrent.CompletableFuture;
4039
import java.util.concurrent.TimeUnit;
4140

@@ -50,28 +49,30 @@ public class TestRaftWithGrpc
5049
SimpleStateMachine4Testing.class, StateMachine.class);
5150
}
5251

53-
public static Collection<Boolean[]> data() {
54-
return Arrays.asList((new Boolean[][] {{Boolean.FALSE}, {Boolean.TRUE}}));
52+
@Disabled
53+
@Override
54+
public void testWithLoad() {
55+
// skip testWithLoad() from parent, called from parameterized testWithLoad(boolean)
5556
}
5657

5758
@ParameterizedTest
58-
@MethodSource("data")
59-
public void testWithLoad(Boolean separateHeartbeat) throws Exception {
59+
@ValueSource(booleans = {true, false})
60+
public void testWithLoad(boolean separateHeartbeat) throws Exception {
6061
GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat);
6162
super.testWithLoad();
6263
BlockRequestHandlingInjection.getInstance().unblockAll();
6364
}
6465

6566
@ParameterizedTest
66-
@MethodSource("data")
67-
public void testRequestTimeout(Boolean separateHeartbeat) throws Exception {
67+
@ValueSource(booleans = {true, false})
68+
public void testRequestTimeout(boolean separateHeartbeat) throws Exception {
6869
GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat);
6970
runWithNewCluster(NUM_SERVERS, cluster -> testRequestTimeout(false, cluster, LOG));
7071
}
7172

7273
@ParameterizedTest
73-
@MethodSource("data")
74-
public void testUpdateViaHeartbeat(Boolean separateHeartbeat) throws Exception {
74+
@ValueSource(booleans = {true, false})
75+
public void testUpdateViaHeartbeat(boolean separateHeartbeat) throws Exception {
7576
GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat);
7677
runWithNewCluster(NUM_SERVERS, this::runTestUpdateViaHeartbeat);
7778
}

0 commit comments

Comments
 (0)