Skip to content

Commit

Permalink
test: fix FailoverV4IntegrationTest failure due to one test stopping …
Browse files Browse the repository at this point in the history
…wiremock

(cherry picked from commit 1417367)
  • Loading branch information
remibaptistegio authored and phiz71 committed Jan 17, 2025
1 parent c1379d3 commit 18d6d5b
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 18d6d5b

Please sign in to comment.