Fix flaky ManagementDistTest (#28522)

Fixes #28509

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
Martin Bartoš 2024-04-09 13:46:25 +02:00 committed by GitHub
parent debccef24b
commit 3a1bca6517
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ import org.keycloak.it.junit5.extension.DistributionTest;
import org.keycloak.it.junit5.extension.DistributionType; import org.keycloak.it.junit5.extension.DistributionType;
import org.keycloak.it.utils.KeycloakDistribution; import org.keycloak.it.utils.KeycloakDistribution;
import java.net.SocketException; import java.io.IOException;
import static io.restassured.RestAssured.when; import static io.restassured.RestAssured.when;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
@ -56,8 +56,8 @@ public class ManagementDistTest {
CLIResult cliResult = (CLIResult) result; CLIResult cliResult = (CLIResult) result;
cliResult.assertNoMessage("Management interface listening on"); cliResult.assertNoMessage("Management interface listening on");
assertThrows(SocketException.class, () -> when().get("/"), "Connection refused must be thrown"); assertThrows(IOException.class, () -> when().get("/"), "Connection refused must be thrown");
assertThrows(SocketException.class, () -> when().get("/health"), "Connection refused must be thrown"); assertThrows(IOException.class, () -> when().get("/health"), "Connection refused must be thrown");
distribution.setRequestPort(8080); distribution.setRequestPort(8080);