You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2018/08/20 22:20:25 UTC

[1/2] tomee git commit: avoid to scan too much when reactor has itest jars

Repository: tomee
Updated Branches:
  refs/heads/tomee-7.1.x 3f96b4280 -> 86379b927


avoid to scan too much when reactor has itest jars

(cherry picked from commit 76cd27f)


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

Branch: refs/heads/tomee-7.1.x
Commit: 86379b927e072cab03666bfb988dd24ea799528f
Parents: 11a2081
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Wed May 16 08:39:44 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Mon Aug 20 22:16:51 2018 +0100

----------------------------------------------------------------------
 .../openejb-core/src/main/resources/default.exclusions  |  3 +++
 .../org/apache/openejb/config/EarModuleNamesTest.java   | 10 +++++++++-
 .../org/apache/openejb/config/rules/InvokeMethod.java   | 12 ++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/86379b92/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..9bcd832 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-
@@ -141,6 +143,7 @@ jsr311-
 jsse.jar
 juli-
 junit-
+junit5-
 kahadb-
 kotlin-runtime
 leveldb

http://git-wip-us.apache.org/repos/asf/tomee/blob/86379b92/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 eadab2f..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
@@ -29,6 +29,7 @@ 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;
 
@@ -36,15 +37,23 @@ import static org.junit.Assert.assertEquals;
  * @version $Rev$ $Date$
  */
 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();
     }
 
@@ -215,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/86379b92/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();
     }
 
     /**


[2/2] tomee git commit: fix broken stateless bean

Posted by jg...@apache.org.
fix broken stateless bean

blew up in other tests with validation errors

(cherry picked from commit ddd970b)


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

Branch: refs/heads/tomee-7.1.x
Commit: 11a2081879d0c5f20a81ab8f21285fe7e671b9b2
Parents: 3f96b42
Author: Mark Struberg <st...@apache.org>
Authored: Tue May 15 20:59:50 2018 +0100
Committer: Roberto Cortez <ra...@yahoo.com>
Committed: Mon Aug 20 22:16:51 2018 +0100

----------------------------------------------------------------------
 .../test/stateful/AnnotatedFieldInjectionStatefulBean.java   | 8 --------
 1 file changed, 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/11a20818/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulBean.java
----------------------------------------------------------------------
diff --git a/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulBean.java b/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulBean.java
index d194c44..2219f8f 100644
--- a/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulBean.java
+++ b/itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateful/AnnotatedFieldInjectionStatefulBean.java
@@ -103,14 +103,6 @@ public class AnnotatedFieldInjectionStatefulBean {
     private BasicStatefulBusinessRemote statefulBusinessRemote;
 
 
-    @Init
-    public void create(final String name) {
-    }
-
-    @Remove
-    public void remove() {
-    }
-
     public void lookupEntityBean() throws TestFailureException {
         try {
             Assert.assertNotNull("The EJBObject is null", bmpHome);