-
1. Re: Can Arquillian be configured not to enhance OSGi @Deployments?
thomas.diesler May 3, 2012 4:31 AM (in response to bosschaert)1 of 1 people found this helpfulThe ARQ deployment is always enhanced - this is because it needs (at least) the test case that it runs.
In the case of an OSGi deployment we also need a boat load of imports to make that work.
If you need more control you can use the Deployer API - have a look at SimpleArquillianDeployerTestCase
-
2. Re: Can Arquillian be configured not to enhance OSGi @Deployments?
bosschaert May 3, 2012 6:34 AM (in response to thomas.diesler)Thanks Thomas, that helped. In my case the test is actually one that drives the management API, so the test itself is not run from within OSGi, hence I don't need the test enhancement for ones that do. The test simply needs to be able to do a remote deployment of an OSGi bundle as-is.
I found that decorating the annotation with 'testable = false' does the job, i.e. like this:
{code:java}
@Deployment(name = "test-bundle", managed = false, testable = false)
public static JavaArchive createTestBundle() {
return ... the archive ...
}{code}