This is an automated email from the ASF dual-hosted git repository. szetszwo pushed a commit to branch release-3.1.3_review in repository https://gitbox.apache.org/repos/asf/ratis.git
commit 20ebed514880e45e48fe312a5c0e3be4c0ab7a6f Author: Doroszlai, Attila <6454655+adorosz...@users.noreply.github.com> AuthorDate: Mon Dec 23 20:16:42 2024 +0100 RATIS-2219. Remove duplicate test case from TestRaftWithGrpc (#1192) --- .../org/apache/ratis/grpc/TestRaftWithGrpc.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ratis-test/src/test/java/org/apache/ratis/grpc/TestRaftWithGrpc.java b/ratis-test/src/test/java/org/apache/ratis/grpc/TestRaftWithGrpc.java index b93621137..5821b7f22 100644 --- a/ratis-test/src/test/java/org/apache/ratis/grpc/TestRaftWithGrpc.java +++ b/ratis-test/src/test/java/org/apache/ratis/grpc/TestRaftWithGrpc.java @@ -31,11 +31,10 @@ import org.apache.ratis.statemachine.StateMachine; import org.apache.ratis.util.JavaUtils; import org.apache.ratis.util.TimeDuration; import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; -import java.util.Arrays; -import java.util.Collection; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; @@ -50,28 +49,30 @@ public class TestRaftWithGrpc SimpleStateMachine4Testing.class, StateMachine.class); } - public static Collection<Boolean[]> data() { - return Arrays.asList((new Boolean[][] {{Boolean.FALSE}, {Boolean.TRUE}})); + @Disabled + @Override + public void testWithLoad() { + // skip testWithLoad() from parent, called from parameterized testWithLoad(boolean) } @ParameterizedTest - @MethodSource("data") - public void testWithLoad(Boolean separateHeartbeat) throws Exception { + @ValueSource(booleans = {true, false}) + public void testWithLoad(boolean separateHeartbeat) throws Exception { GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat); super.testWithLoad(); BlockRequestHandlingInjection.getInstance().unblockAll(); } @ParameterizedTest - @MethodSource("data") - public void testRequestTimeout(Boolean separateHeartbeat) throws Exception { + @ValueSource(booleans = {true, false}) + public void testRequestTimeout(boolean separateHeartbeat) throws Exception { GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat); runWithNewCluster(NUM_SERVERS, cluster -> testRequestTimeout(false, cluster, LOG)); } @ParameterizedTest - @MethodSource("data") - public void testUpdateViaHeartbeat(Boolean separateHeartbeat) throws Exception { + @ValueSource(booleans = {true, false}) + public void testUpdateViaHeartbeat(boolean separateHeartbeat) throws Exception { GrpcConfigKeys.Server.setHeartbeatChannel(getProperties(), separateHeartbeat); runWithNewCluster(NUM_SERVERS, this::runTestUpdateViaHeartbeat); }