Search in sources :

Example 1 with StopSuiteContainers

use of org.jboss.arquillian.container.spi.event.StopSuiteContainers 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)

Example 2 with StopSuiteContainers

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

the class KeycloakContainerEventsController method execute.

@Override
public void execute(@Observes AfterSuite event) {
    container.fire(new StopManualContainers());
    container.fire(new StopSuiteContainers());
}
Also used : StopSuiteContainers(org.jboss.arquillian.container.spi.event.StopSuiteContainers) StopManualContainers(org.jboss.arquillian.container.spi.event.StopManualContainers)

Aggregations

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