[arquillian-issues] [JBoss JIRA] (ARQ-639) Add ability to postpone initialization of non-managed deployments annotated @Deployment(managed=false)
Aslak Knutsen (Commented) (JIRA)
jira-events at lists.jboss.org
Wed Oct 26 09:09:45 EDT 2011
[ https://issues.jboss.org/browse/ARQ-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637569#comment-12637569 ]
Aslak Knutsen commented on ARQ-639:
-----------------------------------
That's what i was expecting.. :)
We have been thinking of adding something like:
{code}
@Deployment(name = "X")
public static WebArchive create() {}
@Deployment(name = "Y")
public static WebArchive createOther(@ArquillianResource @OperatesOnDeployment("X") URL url) {
return ShrinkWrap.create(WebArchive.class)
.setWebXml(Descriptors.create(WebDescriptor.class)
.initialParameter("other.deployment.context",
url));
}
{code}
That will let you access the Deployment context for deployment X while creating Deployment context Y.
Similar during @Test method execution as well, you want @Test to be in context of X, but want to inject objects from context Y
> Add ability to postpone initialization of non-managed deployments annotated @Deployment(managed=false)
> ------------------------------------------------------------------------------------------------------
>
> Key: ARQ-639
> URL: https://issues.jboss.org/browse/ARQ-639
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 1.0.0.CR5
> Reporter: Dominik Pospisil
>
> Currently deployments annotated using @Deployment(managed=false) are initialized prior to test case execution (EventTestRunnerAdaptor.beforeClass:80). Some test scenarios require that the initialization of the deployment is postponed until the actual deployment is performed using Deployer.deploy() call.
> It would be nice if the @Deploymnent(managed=false) method is called during Deployer.deploy() call by default or if there is an option to specify when the initialization should be performed.
> This way the content of the deployment may be constructed / updated during test case runtime using information which may not be available before test execution.
--
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