tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject [5/6] tomee git commit: Tweak this test so it works for 1.7.x
Date Wed, 02 Aug 2017 23:09:37 GMT
Tweak this test so it works for 1.7.x


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

Branch: refs/heads/tomee-1.7.x
Commit: 463e32dea114aff6bfe717955794912c09fa4979
Parents: b02ca6e
Author: Jonathan Gallimore <jon@jrg.me.uk>
Authored: Tue Jul 25 14:02:13 2017 +0100
Committer: Jonathan Gallimore <jon@jrg.me.uk>
Committed: Tue Jul 25 14:02:13 2017 +0100

----------------------------------------------------------------------
 .../classic/ApplicationResourceLifecycleTest.java      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/463e32de/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/ApplicationResourceLifecycleTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/ApplicationResourceLifecycleTest.java
b/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/ApplicationResourceLifecycleTest.java
index 13574cf..19acc5b 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/ApplicationResourceLifecycleTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/assembler/classic/ApplicationResourceLifecycleTest.java
@@ -16,7 +16,9 @@
  */
 package org.apache.openejb.assembler.classic;
 
+import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.config.sys.Resources;
+import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.testing.ApplicationComposers;
 import org.apache.openejb.testing.Classes;
 import org.apache.openejb.testing.Module;
@@ -26,7 +28,6 @@ import org.junit.Test;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.annotation.Resource;
-
 import java.util.concurrent.Callable;
 
 import static org.junit.Assert.assertFalse;
@@ -39,13 +40,17 @@ public class ApplicationResourceLifecycleTest {
 
     @Classes({MyResource.class})
     @Module
-    public Resources resources() {
-        return new Resources() {{
+    public EjbModule resources() {
+
+        final EjbModule ejbModule = new EjbModule(new EjbJar());
+        ejbModule.initResources(new Resources() {{
             getResource().add(new org.apache.openejb.config.sys.Resource() {{
                 setId("test");
                 setClassName(MyResource.class.getName());
             }});
-        }};
+        }});
+
+        return ejbModule;
     }
 
     @Test


Mime
View raw message