-
1. Re: ARQ-638 - Best way to keep the container clean
kpiwko Jan 2, 2013 8:22 AM (in response to grossetieg)1 of 1 people found this helpfulHello Guillaume,
I think there is no way how to clean up a server directory better than copying the container from a vanilla directory/zip to a defined location. (That's something what can be achieved using maven-resources-plugin quite easily even now).
That said, I think that ARQ-638 is rather a general issue for Container API about having a possibility to clean directory from last run either by specifying configuration element or programatically via API then about consolidating AS7 container adaptor features.
I can imagine approach similar to following:
<container qualifier="jboss"> <configuration> <testClassIsolation>true</testClassIsolation> </configuration> </container>
in arquillian.xml would trigger createCleanContainer() method of Arquillian Container API that would copy specified files from directory of (managed|embedded) container into a temporary directory created by Arquillian itself and run tests against that location.
Or maybe better, allowing <testClassIsolation> to work as an enumeration of {suite|class|method} (similar to ARQ-336 implementation). Having this method in API would even allow user to get Container Controller via @ArquillianResource and clean container anytime he wants.
Karel
-
2. Re: ARQ-638 - Best way to keep the container clean
grossetieg Jan 26, 2013 6:49 AM (in response to kpiwko)Hello Karel,
Thanks for the reply
I agree with you but I don't see how we can clean the container at runtime with the createCleanContainer() method. Maybe we could split the task to allow the user to create a clean container before its start and then provide a method in API to clean the container at "runtime" before {suite|class|method}.
I think we need to be careful about what we can clean at "runtime" especially with the data/content directory. Do you know what can be removed/cleaned at "runtime" whitout making the deployment instable ?
Guillaume.
-
3. Re: ARQ-638 - Best way to keep the container clean
grossetieg Feb 22, 2013 3:17 PM (in response to kpiwko)Hi Karel,
I'm starting to look at your solution and I found that the ContainerController API is quite low level. If I add a new clean() method I will have to implement the feature on each container adapters available (and that's quite a lot !) or just throw a NotYetImplementedException...
Is that ok or did I miss something ?
Guillaume.