Search in sources :

Example 1 with StopContainer

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()));
    }
}
Also used : Administration(org.wildfly.extras.creaper.core.online.operations.admin.Administration) OnlineManagementClient(org.wildfly.extras.creaper.core.online.OnlineManagementClient) StartContainer(org.jboss.arquillian.container.spi.event.StartContainer) StopContainer(org.jboss.arquillian.container.spi.event.StopContainer)

Example 2 with StopContainer

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()));
    }
}
Also used : StopContainer(org.jboss.arquillian.container.spi.event.StopContainer)

Example 3 with StopContainer

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()));
    }
}
Also used : Administration(org.wildfly.extras.creaper.core.online.operations.admin.Administration) OnlineManagementClient(org.wildfly.extras.creaper.core.online.OnlineManagementClient) StartContainer(org.jboss.arquillian.container.spi.event.StartContainer) StopContainer(org.jboss.arquillian.container.spi.event.StopContainer)

Example 4 with StopContainer

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()));
    }
}
Also used : StopContainer(org.jboss.arquillian.container.spi.event.StopContainer)

Aggregations

StopContainer (org.jboss.arquillian.container.spi.event.StopContainer)4 StartContainer (org.jboss.arquillian.container.spi.event.StartContainer)2 OnlineManagementClient (org.wildfly.extras.creaper.core.online.OnlineManagementClient)2 Administration (org.wildfly.extras.creaper.core.online.operations.admin.Administration)2