You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Matej Novotny (JIRA)" <ji...@apache.org> on 2017/11/30 09:33:00 UTC

[jira] [Created] (DELTASPIKE-1304) Make CdiTestRunner use "flat" deployment on Weld by default

Matej Novotny created DELTASPIKE-1304:
-----------------------------------------

             Summary: Make CdiTestRunner use "flat" deployment on Weld by default
                 Key: DELTASPIKE-1304
                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1304
             Project: DeltaSpike
          Issue Type: Improvement
            Reporter: Matej Novotny


In Weld 1 this was a default behaviour, with Weld 2 and onwards, this changed but is still configurable.

Since DS depends on Weld 1.x API, there is no option to configure this via {{org.jboss.weld.environment.se.Weld}}, but it can still be done via system property.

Flat deployment would eliminate some test problems as, for instance, custom {{MockManager}}. Namely [{{CustomMockManager}}|https://github.com/apache/deltaspike/blob/master/deltaspike/modules/test-control/impl/src/test/java/org/apache/deltaspike/test/testcontrol/CustomMockManager.java] and the test linked to it which breaks all tests in that module for Weld.
The reason is that it uses {{beans.xml}} to enable alternatives, which in Weld only works for given bean archive (e.g. this leads to eternal Holy Bean Archive War between Weld and OWB interpretations :) ).
Swapping the test runner behaviour with Weld shouldn't cause any harm as this is unit test level and the "flatness" doesn't really matter there.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)