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

test: fix FailoverV4IntegrationTest failure due to one test stopping … #10431

Merged
merged 1 commit into from
Jan 17, 2025
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 @@ -82,8 +82,11 @@
import java.util.function.Function;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.DisplayNameGenerator;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.mockito.stubbing.OngoingStubbing;

/**
Expand Down Expand Up @@ -520,6 +523,8 @@ void should_fail_and_open_circuit_after_five_failures(HttpClient client) {
}

@Nested
//Need to add test order since last test (should_retry_and_fail_on_connection_exception) is stopping wiremock which is messing with the other tests
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@GatewayTest
class OnlyOneEndpointInGroup extends FailoverV4EmulationIntegrationTest.OnlyOneEndpointInGroup {

Expand All @@ -535,34 +540,39 @@ public void configureEndpoints(Map<String, EndpointConnectorPlugin<?, ?>> endpoi

@Override
@DeployApi("/apis/v4/http/failover/api-only-one-endpoint.json")
@Order(1)
@Test
void should_retry_and_fail_on_slow_call_posting_payload(HttpClient client) {
super.should_retry_and_fail_on_slow_call_posting_payload(client);
}

@Override
@DeployApi("/apis/v4/http/failover/api-only-one-endpoint.json")
@Order(2)
@Test
void should_not_retry_on_fast_call(HttpClient client) {
super.should_not_retry_on_fast_call(client);
}

@Override
@DeployApi("/apis/v4/http/failover/api-only-one-endpoint.json")
@Order(3)
@Test
void should_retry_and_fail_on_slow_call(HttpClient client) {
super.should_retry_and_fail_on_slow_call(client);
}

@Override
@DeployApi("/apis/v4/http/failover/api-only-one-endpoint.json")
@Order(5)
@Test
void should_retry_and_fail_on_connection_exception(HttpClient client, Vertx vertx) {
super.should_retry_and_fail_on_connection_exception(client, vertx);
}

@Override
@DeployApi("/apis/v4/http/failover/api-only-one-endpoint.json")
@Order(4)
@Test
void should_success_on_first_retry(HttpClient client) {
super.should_success_on_first_retry(client);
Expand Down