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

Martin Gencur (Commented) (JIRA) jira-events at lists.jboss.org
Mon Nov 7 03:20:47 EST 2011


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

Martin Gencur commented on ARQ-336:
-----------------------------------

This won't work because the "start" method will start the container only if it's not started yet. When you don't call stop() or kill(), the container will be still marked as "started": https://github.com/mgencur/arquillian-core/blob/12d710e821e51e9231114cdb3417858fd0f8fdbf/container/impl-base/src/main/java/org/jboss/arquillian/container/impl/client/container/ContainerLifecycleController.java . We would need to reconsider the approach again. However, you can provide your own implementation of a https://github.com/mgencur/arquillian-core/blob/12d710e821e51e9231114cdb3417858fd0f8fdbf/container/spi/src/main/java/org/jboss/arquillian/container/spi/ServerKillProcessor.java and do the waiting for byteman to kill the server in its kill() method (an example can be found here: https://github.com/mgencur/edg-tests/blob/master/failover/src/main/java/org/arquillian/edg/failover/extension/JBossAS7ServerKillProcessor.java). Then you would normally call controller.kill(CONTAINER1). Is that !
 clear?
                
> 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
>             Fix For: 1.0.0.Final
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list