[
https://issues.jboss.org/browse/ARQ-336?page=com.atlassian.jira.plugin.sy...
]
Martin Gencur commented on ARQ-336:
-----------------------------------
All the functionality is implemented already but not yet pushed.
A user will be able to inject a ContainerController:
{code:java}
@ArquillianResource
ContainerController container;
{code}
and start/stop/kill server instances like this:
{code:java}
@Test
public void killTest() throws Exception {
//CONTAINER2 variable corresponds to container's name specified via qualifier
arquillian.xml
// ... <container qualifier="container2" managed="false">
controller.start(CONTAINER2);
//do some test
controller.stop(CONTAINER2);
//do some test
controller.start(CONTAINER2);
//do some test
controller.kill(CONTAINER2);
//do some test
}
{code}
The kill method has a default implementation called DefaultServerKillProcessor
(implements org.jboss.arquillian.container.spi.ServerKillProcessor) which is used if no
other
impls are available. These can be shipped with DeployableContainer implementations or
directly within a
test. The default implementation does the same as stop() so when there is a need to hard
kill a server
instance, the concrete implementation for the target container has to be supplied.
There are certain limitations, though. When running in a Client mode (@RunAsClient), all
servers
can be started/stopped/killed. To run in InContainer mode only containers other than the
one running
the test can be stopped/killed.
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