You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2018/01/18 15:46:29 UTC

[34/50] tomee git commit: add classes instead of package -> test

add classes instead of package -> test

(cherry picked from commit dc6065bc5554bf88e214634277aebc17787503a0)


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

Branch: refs/heads/tomee-1.7.x
Commit: f9f1d8190e65a96d62b3c4e651c486b4f75733cb
Parents: 0afaaba
Author: Thiago Veronezi <th...@veronezi.org>
Authored: Fri Jan 5 11:08:33 2018 -0500
Committer: Thiago Veronezi <th...@veronezi.org>
Committed: Wed Jan 17 13:14:17 2018 -0500

----------------------------------------------------------------------
 .../src/test/java/org/superbiz/SimpleMdbTest.java           | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/f9f1d819/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
----------------------------------------------------------------------
diff --git a/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java b/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
index aeda0aa..fb2a1cd 100644
--- a/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
+++ b/examples/polling-parent/polling-mdb/src/test/java/org/superbiz/SimpleMdbTest.java
@@ -18,7 +18,6 @@ package org.superbiz;
 
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.asset.ClassLoaderAsset;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
@@ -26,6 +25,8 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.superbiz.mdb.Api;
+import org.superbiz.mdb.ApiLog;
+import org.superbiz.mdb.LogMdb;
 import org.superbiz.mdb.LogsBean;
 
 import javax.ejb.EJB;
@@ -41,8 +42,8 @@ public class SimpleMdbTest {
 
     @Deployment
     public static WebArchive createDeployment() {
-        return ShrinkWrap.create(WebArchive.class, "test.war")
-                .addPackage(Api.class.getPackage())
+        return ShrinkWrap.create(WebArchive.class)
+                .addClasses(Api.class, ApiLog.class, LogMdb.class, LogsBean.class)
                 .addAsResource(new ClassLoaderAsset("META-INF/beans.xml"), "META-INF/beans.xml")
                 .addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml");
     }
@@ -56,7 +57,7 @@ public class SimpleMdbTest {
     @Test
     public void testDataSourceOne() throws Exception {
         final Client client = ClientBuilder.newClient();
-        for (int i = 0; i < 20; i++) {
+        for (int i = 0; i < 2; i++) {
             client.target(baseURL.toExternalForm())
                     .request("log/lala_" + i)
                     .get();