[arquillian-issues] [JBoss JIRA] Created: (ARQ-596) A test method should be able require redeployment before or after it has been executed.
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Wed Sep 14 11:08:26 EDT 2011
A test method should be able require redeployment before or after it has been executed.
---------------------------------------------------------------------------------------
Key: ARQ-596
URL: https://issues.jboss.org/browse/ARQ-596
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Geoffrey De Smet
Priority: Optional
Why would a test method need this?
- before: because it wants a clean database (or clean cache or clean cached history or clean session or clean ...)
- after: because it seriously disrupts the CDI container or enviroment. For example: it takes the configuration and changes it, it deletes some database files, ...
Note that the deployment should be CPU efficient:
If the container just deployed and this is the first test and before=true, then it shouldn't redeploy.
If it is the last test for a deployment and after=true, then it shouldn't redeploy.
Some hints from aslak on where to implement this:
create it as a extension
implement LoadableExtension
create some @Observer(precendece = -1) of EventContext<Before>
then @Inject Instance<Container> and @Inject Instance<Deployment>
read the before.getTestMethod().annotations..
if redeploy is .. container.get().getDeployableContainer().undeploy(deployment.getTestArchive())
--
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