Search in sources :

Example 1 with StartSuiteContainers

use of org.jboss.arquillian.container.spi.event.StartSuiteContainers in project keycloak by keycloak.

the class KeycloakContainerEventsController method execute.

@Override
public void execute(BeforeClass event) {
    if (event.getTestClass().isAnnotationPresent(RestartContainer.class)) {
        // stop executing the test - remote container cannot be restarted
        ContainerAssume.assumeNotAuthServerRemote();
        RestartContainer restartContainer = event.getTestClass().getAnnotation(RestartContainer.class);
        beforeOriginalContainerStop(restartContainer);
        container.fire(new StopManualContainers());
        container.fire(new StopSuiteContainers());
        beforeNewContainerStart(restartContainer);
        container.fire(new StartClassContainers());
        container.fire(new StartSuiteContainers());
    }
    super.execute(event);
}
Also used : StopSuiteContainers(org.jboss.arquillian.container.spi.event.StopSuiteContainers) StartSuiteContainers(org.jboss.arquillian.container.spi.event.StartSuiteContainers) RestartContainer(org.keycloak.testsuite.arquillian.annotation.RestartContainer) StopManualContainers(org.jboss.arquillian.container.spi.event.StopManualContainers) StartClassContainers(org.jboss.arquillian.container.spi.event.StartClassContainers)

Aggregations

StartClassContainers (org.jboss.arquillian.container.spi.event.StartClassContainers)1 StartSuiteContainers (org.jboss.arquillian.container.spi.event.StartSuiteContainers)1 StopManualContainers (org.jboss.arquillian.container.spi.event.StopManualContainers)1 StopSuiteContainers (org.jboss.arquillian.container.spi.event.StopSuiteContainers)1 RestartContainer (org.keycloak.testsuite.arquillian.annotation.RestartContainer)1