tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject tomee git commit: adding more logging as this test still breaks in CI
Date Fri, 07 Apr 2017 15:18:18 GMT
Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 77109e43d -> db5aa025d


adding more logging as this test still breaks in CI


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

Branch: refs/heads/tomee-1.7.x
Commit: db5aa025dad29e13dfaa1ac3c3f560c8dcf8ab87
Parents: 77109e4
Author: Mark Struberg <struberg@apache.org>
Authored: Fri Apr 7 17:17:47 2017 +0200
Committer: Mark Struberg <struberg@apache.org>
Committed: Fri Apr 7 17:17:47 2017 +0200

----------------------------------------------------------------------
 .../activemq/ActiveMQResourceAdapterControlTest.java  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/db5aa025/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapterControlTest.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapterControlTest.java
b/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapterControlTest.java
index 338e4c2..40023a8 100644
--- a/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapterControlTest.java
+++ b/container/openejb-core/src/test/java/org/apache/openejb/resource/activemq/ActiveMQResourceAdapterControlTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.resource.activemq;
 
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.openejb.config.EjbModule;
 import org.apache.openejb.jee.EjbJar;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
@@ -45,6 +46,8 @@ import java.util.Properties;
 import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -54,6 +57,9 @@ import static org.junit.Assert.fail;
 
 @RunWith(ApplicationComposer.class)
 public class ActiveMQResourceAdapterControlTest {
+    
+    private static final Logger logger = Logger.getLogger(ActiveMQResourceAdapterControlTest.class.getName());
+    
     @Resource(name = "ActiveMQResourceAdapterControlTest/test/ejb/Mdb")
     private Queue queue;
 
@@ -108,7 +114,7 @@ public class ActiveMQResourceAdapterControlTest {
         setControl("stop");
         // default would be wait 10s, but if machine is slow we compute it from the first
msg stats
         final long waitWithoutResponse = Math.max(10, 5 * (end - start) / 1000);
-        System.out.println("We'll wait " + waitWithoutResponse + "s to get a message on a
stopped listener");
+        logger.info("We'll wait " + waitWithoutResponse + "s to get a message on a stopped
listener");
         assertFalse(Mdb.awaiter.messages.poll(), sendAndWait("Will be received after", waitWithoutResponse,
TimeUnit.SECONDS));
         assertNull(Mdb.awaiter.messages.poll());
 
@@ -148,6 +154,7 @@ public class ActiveMQResourceAdapterControlTest {
                 MessageProducer producer = null;
                 try {
                     producer = session.createProducer(queue);
+                    logger.log(Level.INFO, "Sending Message {0}", txt);
                     producer.send(session.createTextMessage(txt));
                 } finally {
                     if (producer != null) {
@@ -173,7 +180,10 @@ public class ActiveMQResourceAdapterControlTest {
         @Override
         public synchronized void onMessage(final Message message) {
             try {
-                awaiter.messages.add(TextMessage.class.cast(message).getText());
+                String text = TextMessage.class.cast(message).getText();
+                logger.log(Level.INFO, "Got Messag: {0}", text);
+                awaiter.messages.add(text);
+                logger.log(Level.INFO, "Mssages on store: {0}", ArrayUtils.toString(awaiter.messages.toArray(new
String[0])) );
             } catch (final JMSException e) {
                 throw new IllegalStateException(e);
             } finally {


Mime
View raw message