[arquillian-issues] [JBoss JIRA] Commented: (ARQ-336) Inject container references in the test to start/stop containers
Martin Gencur (JIRA)
jira-events at lists.jboss.org
Tue Sep 20 10:12:26 EDT 2011
[ https://issues.jboss.org/browse/ARQ-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629366#comment-12629366 ]
Martin Gencur commented on ARQ-336:
-----------------------------------
I implemented proposed changes: https://github.com/mgencur/arquillian-core/commit/9603075003454ef472651837d68a763c92c12ceb. When someone wants to try it they can use https://github.com/mgencur/edg-tests/tree/master/failover example.
Current usage looks like this:
{code:java}
@ArquillianResource
ContainerController controller;
@Test
public void killTest() throws Exception {
//CONTAINER2 variable corresponds to container's name specified via qualifier arquillian.xml
// ... <container qualifier="container2" mode="manual">
//other values are mode="suite|class" , "suite" is default, "class" not implemented yet, that will be in ARQ-236
controller.start(CONTAINER2);
//do some test
controller.stop(CONTAINER2);
//do some test
//the second parameter is of type Map<String, String>, the Config class is just a thing of convenience
controller.start(CONTAINER2, new Config().add("managementPort", "19999").add("xx","yy").map());
//do some test
controller.kill(CONTAINER2);
//do some test
}
{code}
> 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.1.0.Beta1
>
>
> 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