Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RATIS-2219. Remove duplicate test case from TestRaftWithGrpc #1192

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
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;

Expand All @@ -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);
}
Expand Down
Loading