very interesting idea. I'm not familiar with Dropwizard but I believe that right approach would be to implement generic Archive<?> (e.g DropWizard archive) and provide some Java API to create Application class.
This way you can easily modify Dropwizard configuration directly from tests.
I think is is possible and not so difficult. But how can I ensure to use unly artifacts from this archive when running Dropwizard? Does Arquillian provide some generic/easy way to change the classloading?
1 of 1 people found this helpful
Hi Oliver, Dropwizard doesn't have a concept of classloaders, or better said, the point is to avoid them.
There is no concept of deploying and undeploying AFAIK. Typical setup is to bundle all classes to one shaded jar.
So, there is no smart way to leverage Arquillian's purpose to be a quick way of shooting test deployments to the server.
I think the idiomatic way to go with arquillian would be to add the whole dropwizard uber-jar and all your dependencies to the test archive, for each single test.
It's doable but not too practical.
One way to try could be having dropwizard unzipped, and in an Arquillian container implementation, overlay the test deployment classes in that directory and remove them and restart DropWizard, as a way of deploying.