[JAVA-22589] Added @DirtiesContext and re-enabled test case

This commit is contained in:
panos-kakos 2023-07-03 17:15:45 +03:00
parent 2485d25140
commit c305321a42
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,6 @@ import java.util.Map;
import java.util.concurrent.*; import java.util.concurrent.*;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -30,8 +29,10 @@ import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
class ResilientAppControllerIntegrationTest { class ResilientAppControllerIntegrationTest {
private final Logger LOGGER = LoggerFactory.getLogger(getClass()); private final Logger LOGGER = LoggerFactory.getLogger(getClass());
@ -202,7 +203,6 @@ class ResilientAppControllerIntegrationTest {
return timeLimiterEvents.getTimeLimiterEvents(); return timeLimiterEvents.getTimeLimiterEvents();
} }
@Disabled
@Test @Test
void testBulkheadEvents() throws Exception { void testBulkheadEvents() throws Exception {
EXTERNAL_SERVICE.stubFor(WireMock.get("/api/external").willReturn(ok())); EXTERNAL_SERVICE.stubFor(WireMock.get("/api/external").willReturn(ok()));