deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manov...@apache.org
Subject deltaspike git commit: DELTASPIKE-1304 CdiTestRunner will not use flat deployment for Weld.
Date Thu, 30 Nov 2017 09:36:14 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 126362e4f -> 390d270cc


DELTASPIKE-1304 CdiTestRunner will not use flat deployment for Weld.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/390d270c
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/390d270c
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/390d270c

Branch: refs/heads/master
Commit: 390d270cca6b300ab3f617ba4e61a69029952227
Parents: 126362e
Author: Matej Novotny <manovotn@apache.org>
Authored: Thu Nov 30 10:33:52 2017 +0100
Committer: Matej Novotny <manovotn@apache.org>
Committed: Thu Nov 30 10:33:52 2017 +0100

----------------------------------------------------------------------
 .../deltaspike/testcontrol/api/junit/CdiTestRunner.java       | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/390d270c/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
index fd17416..e05b871 100644
--- a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
+++ b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestRunner.java
@@ -460,6 +460,13 @@ public class CdiTestRunner extends BlockJUnit4ClassRunner
             {
                 if (!CdiTestSuiteRunner.isContainerStarted())
                 {
+                    // We are setting this system property to make the deployment for Weld
"flat"
+                    // This (amongst other things) means that alternatives enabled via beans.xml
will be 
+                    // enabled globally
+                    // Beginning with Weld 2.x you could use Weld.property(), but here we
depend on Weld 1.x API
+                    // Note that Weld 1 was "flat" anyway, so this property only affects
newer versions of Weld
+                    System.setProperty("org.jboss.weld.se.archive.isolation", "false");
+
                     container.boot(CdiTestSuiteRunner.getTestContainerConfig());
                     setContainerStarted();
 


Mime
View raw message