[arquillian-issues] [JBoss JIRA] Commented: (ARQ-336) Inject container references in the test to start/stop containers

Karel Piwko (JIRA) jira-events at lists.jboss.org
Tue Jul 19 03:16:24 EDT 2011


    [ https://issues.jboss.org/browse/ARQ-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12614961#comment-12614961 ] 

Karel Piwko commented on ARQ-336:
---------------------------------

I would expect that suite-based container will get stopped, a class-based will be started and after class tests are finished class-based container will be stopped and the suite-based one started, a bit messy. Or @ContainerClassLifecycle consumer will figure out that there is already @ContainerSuiteLifecycle container and will simply output a warning.

Following example makes much more sense:

{code}
@ContainerSuiteLifecycle("container1")
public class Foo1Test {
// only container 1 is running here
}

and

@ContainerClassLifecycle("container2")
public class Foo2Test {
// both containers are running here
}
{code}

Xml-based configuration and mode="class" container2, it will be started for every class, which might not be needed. Both ways kind of complements themselves in means of flexibility.

One more thing to think about: The annotation itself does not guarantee that container will be clean. Imagine an use case where user want to deploy to a clean installation after some tests are done and so he wants to spawn class-based container. However, it will share the configuration with suite based one being "polluted" by other class in the test suite.

> Inject container references in the test to start/stop containers
> ----------------------------------------------------------------
>
>                 Key: ARQ-336
>                 URL: https://issues.jboss.org/browse/ARQ-336
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: Base Implementation
>            Reporter: Jean Deruelle
>            Assignee: Martin Gencur
>
> Useful to test HA configuration and failover.
> Start 3 instances of JBoss AS in cluster mode target one of them and be able to kill it and start new nodes on demand to test failover.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list