Reputation: 1017
Situation:
JUnit is capable of running multiple test methods/classes in paralell. We have a bunch of integration tests that use Arquillian. In these tests we use our maven-build war artifact as @Deployment
and enrich it with a few test helpers.
Question Is it possible to enable parallel testing for Arquillian tests? Are there restrictions? If it's not possible: Is there some documentation about that fact?
Concerns I think running multiple tests in paralell might be problematic. We usually only use the same single deployment for all methods in a Test class. If i run multiple test methods in paralell, will the same deployment be used, or will each method try to re-deploy its deployment?. What if there are different deployments for different methods in the same class, which shall be executed in paralell? Does Arquilian manage this, or will this cause errors?
Why should it cause errors? Because the deployments always contain the whole application. All beans. All Services which might use resources (ports) and whatnot. For example, if multiple deployments want to register the same EJBs, the whole thing must go down the drain.
... right? Does Arquillian handle these problems (can't think of a way how it could)?
Upvotes: 3
Views: 1848
Reputation: 11733
It's going to depend on your container. For an embedded container, it should work without an issue (assuming ports don't conflict for any listeners). For a managed or remote, you'll get inconsistent results.
Upvotes: 2