Skip to content

Commit

Permalink
[Windows] Stabilizing flaky Quarkus unit tests
Browse files Browse the repository at this point in the history
Closes: keycloak#35405

Signed-off-by: Peter Zaoral <[email protected]>
  • Loading branch information
Pepo48 committed Dec 5, 2024
1 parent b6b4442 commit 8097513
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
class KeycloakMetricsConfigurationTest {

@BeforeEach
void setUpPort() {
void setUp() {
RestAssured.port = 9001;
System.setProperty("KC_CACHE", "local"); // avoid flaky port conflicts
}

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void testReadinessDown() {
agroalDataSource.close();

RestAssured.port = 9001;
System.setProperty("KC_CACHE", "local"); // avoid flaky port conflicts
given()
.when().get("/health/ready")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
class KeycloakPathConfigurationTest {

@BeforeEach
void setUpPort() {
void setUp() {
RestAssured.port = 9001;
System.setProperty("KC_CACHE", "local"); // avoid flaky port conflicts
}

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
public class KeycloakReadyHealthCheckTest {

@BeforeEach
void setUpPort() {
void setUp() {
RestAssured.port = 9001;
System.setProperty("KC_CACHE", "local"); // avoid flaky port conflicts
}

@RegisterExtension
Expand Down

0 comments on commit 8097513

Please sign in to comment.