We (Stuart and me) already discussed this, and he's aware that this needs to be fixed.
I think a simple / basic idea is to have SetupActions as part of deployment's attachments,
where each sub-system properly adds them to the underlying deployment.
But I'll let you two discuss the details. :-)
There are two weld related things in the subsystem, both of them are temporary.
At the moment there is no 'proper' way to tell when a deployment is finished, so I wait on the weld service to come up to make sure that the deployment is in a usable state before the tests run.
Also as Ales mentioned above I am also planning on moving the setup actions stuff out of Arquillian and into the appropriate subsystem.
Thanks, I pull it in here: https://github.com/jbosgi/jboss-as/commit/aedf9fbd62cdb9f9d456ca01061023df2b9a567c
I still like to discuss what needs to change in ARQ so that your use case is supported.
ARQ allready supports @BeforeClass/@AfterClass and @Before/@After. Is it not possible to put the logic in the test? The ContextManager could be injected by a TestEnricher. Does ARQ need a notion of SetupAction?
Let me ping Aslak about this.