Fix flaky ManagementDistTest (#28522)
Fixes #28509 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
debccef24b
commit
3a1bca6517
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue