-
1. Re: Should @OperateOnDeployment + @ArquillianResource work on unmanaged deployments?
aslak Dec 13, 2011 11:36 AM (in response to rhusar)You can't operate on a deployment you have not yet deployed (You can't assosiate your self with a deployment context that is not yet created)
hmm, depending a bit on how the rest of the TestClass looks, you probably need to split this up in two @TestMethods.
@Test @InSequence(1) public void testSetup() throws IOException, InterruptedException { // Container is unmanaged, need to start manually. controller.start(CONTAINER1); deployer.deploy(DEPLOYMENT1); controller.start(CONTAINER2); deployer.deploy(DEPLOYMENT2); } @Test @InSequence(2) @OperateOnDeployment(DEPLOYMENT1) public void testGracefulSimpleFailover(@ArquillianResource(SimpleServlet.class) URL baseURL) throws IOException, InterruptedException { DefaultHttpClient client = new DefaultHttpClient(); // ARQ-674 Ouch, second hardcoded URL will need fixing. ARQ doesnt support @OperateOnDeployment on 2 containers. String url1 = "http://127.0.0.1:8080/distributable/simple"; /* baseURL.toString() + "simple"; */ }
-
2. Re: Should @OperateOnDeployment + @ArquillianResource work on unmanaged deployments?
aslak Dec 13, 2011 11:38 AM (in response to aslak)1 of 1 people found this helpfulCore Master branch has support for @OperateOnDeployment on @ArquillanResource, will be part of CR7 out at the end of the week:
@Test public void test(@ArquillianResource @OperateOnDeployment("X") URL appX, @ArquillianResource @OperateOnDeployment("Z") URL appZ) { ... }
-
3. Re: Should @OperateOnDeployment + @ArquillianResource work on unmanaged deployments?
rhusar Dec 13, 2011 4:28 PM (in response to aslak)Thanks Aslak, thats what I was after. It does make sense that you cant operate on the deployment which hasnt been deployed. At the same time theoretically you should be able to generate stuff like context URL prior to deployment, but I agree its far from systematic and consistence.
I like the solution with CR7, so I ll redo the test once its out. I hope you ll update AS7 master with it :-)
BTW Here is the concrete example if anyone is interested on this pull request:
https://github.com/jbossas/jboss-as/pull/882
Thanks,
Rado