use of org.wildfly.extras.creaper.core.online.OnlineManagementClient in project keycloak by keycloak.
the class AbstractBasePhotozExampleAdapterTest method fixBrokenDeserializationOnEAP6.
// workaround for KEYCLOAK-8660 from https://stackoverflow.com/questions/50917932/what-versions-of-jackson-are-allowed-in-jboss-6-4-20-patch
@Before
public void fixBrokenDeserializationOnEAP6() throws IOException, CliException, TimeoutException, InterruptedException {
if (AppServerTestEnricher.isEAP6AppServer()) {
OnlineManagementClient client = AppServerTestEnricher.getManagementClient();
Administration administration = new Administration(client);
client.execute("/system-property=jackson.deserialization.whitelist.packages:add(value=org.keycloak.example.photoz)");
administration.reloadIfRequired();
}
}
use of org.wildfly.extras.creaper.core.online.OnlineManagementClient in project keycloak by keycloak.
the class KeycloakContainerFeaturesController method restartAuthServer.
public void restartAuthServer() throws Exception {
if (isAuthServerRemote()) {
try (OnlineManagementClient client = getManagementClient()) {
int timeoutInSec = Integer.getInteger(System.getProperty("auth.server.jboss.startup.timeout"), 300);
Administration administration = new Administration(client, timeoutInSec);
administration.reload();
}
} else {
stopContainerEvent.fire(new StopContainer(suiteContextInstance.get().getAuthServerInfo().getArquillianContainer()));
startContainerEvent.fire(new StartContainer(suiteContextInstance.get().getAuthServerInfo().getArquillianContainer()));
}
}
use of org.wildfly.extras.creaper.core.online.OnlineManagementClient in project keycloak by keycloak.
the class AuthServerTestEnricher method executeCli.
public static void executeCli(String... commands) throws Exception {
OnlineManagementClient client = AuthServerTestEnricher.getManagementClient();
Administration administration = new Administration(client);
for (String c : commands) {
client.execute(c).assertSuccess();
}
administration.reload();
client.close();
}
use of org.wildfly.extras.creaper.core.online.OnlineManagementClient in project keycloak by keycloak.
the class AuthServerTestEnricher method restartAuthServer.
public void restartAuthServer() throws Exception {
if (isAuthServerRemote()) {
try (OnlineManagementClient client = getManagementClient()) {
int timeoutInSec = Integer.getInteger(System.getProperty("auth.server.jboss.startup.timeout"), 300);
Administration administration = new Administration(client, timeoutInSec);
administration.reload();
}
} else {
stopContainerEvent.fire(new StopContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
startContainerEvent.fire(new StartContainer(suiteContext.getAuthServerInfo().getArquillianContainer()));
}
}
use of org.wildfly.extras.creaper.core.online.OnlineManagementClient in project keycloak by keycloak.
the class ClientSearchTest method executeCli.
private void executeCli(String... commands) throws Exception {
OnlineManagementClient client = AuthServerTestEnricher.getManagementClient();
Administration administration = new Administration(client);
log.debug("Running CLI commands:");
for (String c : commands) {
log.debug(c);
client.execute(c).assertSuccess();
}
log.debug("Done");
administration.reload();
client.close();
}
Aggregations