use of org.jboss.arquillian.container.spi.event.StopContainer 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.jboss.arquillian.container.spi.event.StopContainer in project keycloak by keycloak.
the class AuthServerTestEnricher method stopMigratedContainer.
public void stopMigratedContainer(@Observes(precedence = 1) StartSuiteContainers event) {
if (suiteContext.isAuthServerMigrationEnabled()) {
log.info("## STOP old container: " + suiteContext.getMigratedAuthServerInfo().getQualifier());
stopContainerEvent.fire(new StopContainer(suiteContext.getMigratedAuthServerInfo().getArquillianContainer()));
}
}
use of org.jboss.arquillian.container.spi.event.StopContainer 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.jboss.arquillian.container.spi.event.StopContainer in project keycloak by keycloak.
the class HotRodStoreTestEnricher method afterSuite.
public void afterSuite(@Observes(precedence = 4) AfterSuite event) {
if (!AuthServerTestEnricher.HOT_ROD_STORE_ENABLED)
return;
ContainerInfo hotRodContainer = suiteContext.getHotRodStoreInfo();
if (hotRodContainer != null && hotRodContainer.isStarted()) {
log.infof("HotRod store stopping: %s", hotRodContainer.getQualifier());
stopContainerEvent.fire(new StopContainer(hotRodContainer.getArquillianContainer()));
}
}
Aggregations