tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject [38/50] [abbrv] tomee git commit: avoid to scan too much when reactor has itest jars
Date Thu, 26 Jul 2018 10:18:53 GMT
avoid to scan too much when reactor has itest jars


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/76cd27fc
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/76cd27fc
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/76cd27fc

Branch: refs/heads/master
Commit: 76cd27fc51786789d7da609f451168b53d27a012
Parents: 4224af3
Author: Romain Manni-Bucau <rmannibucau@gmail.com>
Authored: Wed May 16 09:39:44 2018 +0200
Committer: Romain Manni-Bucau <rmannibucau@gmail.com>
Committed: Wed May 16 09:39:44 2018 +0200

----------------------------------------------------------------------
 .../openejb-core/src/main/resources/default.exclusions  |  5 +++++
 .../org/apache/openejb/config/EarModuleNamesTest.java   | 12 +++++++++---
 .../org/apache/openejb/config/rules/InvokeMethod.java   | 12 ++++++++++++
 3 files changed, 26 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/main/resources/default.exclusions
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/resources/default.exclusions b/container/openejb-core/src/main/resources/default.exclusions
index d46396b..d795634 100644
--- a/container/openejb-core/src/main/resources/default.exclusions
+++ b/container/openejb-core/src/main/resources/default.exclusions
@@ -33,6 +33,7 @@ axis2-
 batchee-jbatch
 bcprov-
 bootstrap.jar
+bsh-
 bval-core
 bval-jsr
 byte-buddy
@@ -63,6 +64,7 @@ commons-pool2-
 cryptacular-
 cssparser-
 cxf-
+debugger-agent
 deploy.jar
 derby-
 derbyclient-
@@ -80,6 +82,8 @@ jnr-
 johnzon-
 fusemq-leveldb-
 geronimo-connector
+geronimo-j2ee-
+geronimo-jpa_
 geronimo-javamail
 geronimo-transaction
 google-
@@ -141,6 +145,7 @@ jsr311-
 jsse.jar
 juli-
 junit-
+junit5-
 kahadb-
 kotlin-runtime
 leveldb

http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java
b/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java
index 7dd3e8d..cbb6096 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/EarModuleNamesTest.java
@@ -23,30 +23,37 @@ import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.Archives;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import javax.ejb.Singleton;
 import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.stream.Stream;
 
 import static org.junit.Assert.assertEquals;
 
 /**
  * @version $Rev$ $Date$
  */
-@Ignore("this needs to get properly fixed. Currently it misses the TxMgr and thus blows up")
 public class EarModuleNamesTest {
+    private static final String[] ORIGINAL_EXCLUSIONS = NewLoaderLogic.getExclusions();
+
     @BeforeClass
     public static void preventDefaults() {
         System.setProperty("openejb.environment.default", "false");
         SystemInstance.reset();
+        // we use it in a bunch of other tests but not here
+        NewLoaderLogic.setExclusions(
+                Stream.concat(Stream.of(ORIGINAL_EXCLUSIONS),
+                        Stream.of("openejb-itest", "failover-ejb"))
+                      .toArray(String[]::new));
     }
 
     @AfterClass
     public static void reset() {
         System.clearProperty("openejb.environment.default");
+        NewLoaderLogic.setExclusions(ORIGINAL_EXCLUSIONS);
         SystemInstance.reset();
     }
 
@@ -217,7 +224,6 @@ public class EarModuleNamesTest {
         assertEquals("testIdWebapp", appInfo.webApps.get(0).moduleId);
     }
 
-
     @Singleton
     public static class Orange {
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/76cd27fc/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
index 7ef0dbd..d7c6eb0 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/config/rules/InvokeMethod.java
@@ -22,6 +22,7 @@ import org.apache.openejb.assembler.classic.TransactionServiceInfo;
 import org.apache.openejb.config.AppModule;
 import org.apache.openejb.config.ConfigurationFactory;
 import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.config.NewLoaderLogic;
 import org.apache.openejb.config.OutputGeneratedDescriptors;
 import org.apache.openejb.config.ValidationContext;
 import org.apache.openejb.config.ValidationFailedException;
@@ -39,6 +40,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.ResourceBundle;
 import java.util.Set;
+import java.util.stream.Stream;
 
 import static org.apache.openejb.config.rules.ValidationAssertions.assertErrors;
 import static org.apache.openejb.config.rules.ValidationAssertions.assertFailures;
@@ -49,6 +51,8 @@ import static org.junit.Assert.fail;
  * This Statement is the one which runs the test.
  */
 public class InvokeMethod extends Statement {
+    private static final String[] ORIGINAL_EXCLUSIONS = NewLoaderLogic.getExclusions();
+
     private ConfigurationFactory config;
     private Assembler assembler;
     // The test method
@@ -127,6 +131,12 @@ public class InvokeMethod extends Statement {
     }
 
     private void setUp() throws Exception {
+        SystemInstance.reset();
+        // we use it in a bunch of other tests but not here
+        NewLoaderLogic.setExclusions(
+                Stream.concat(Stream.of(ORIGINAL_EXCLUSIONS),
+                        Stream.of("openejb-itest", "failover-ejb"))
+                      .toArray(String[]::new));
         config = new ConfigurationFactory();
         assembler = new Assembler();
         assembler.createTransactionManager(config.configureService(TransactionServiceInfo.class));
@@ -134,6 +144,8 @@ public class InvokeMethod extends Statement {
     }
 
     private void tearDown() {
+        NewLoaderLogic.setExclusions(ORIGINAL_EXCLUSIONS);
+        SystemInstance.reset();
     }
 
     /**


Mime
View raw message