activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kea...@apache.org
Subject git commit: Added @Ignore because of https://issues.apache.org/jira/browse/AMQ-5126
Date Fri, 28 Mar 2014 16:33:49 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 5da7ab3c0 -> 4faf11d82


Added @Ignore because of https://issues.apache.org/jira/browse/AMQ-5126


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

Branch: refs/heads/trunk
Commit: 4faf11d821f6ca0a8bd9cd0e9df78ec2b2f6d9b2
Parents: 5da7ab3
Author: Kevin Earls <kevin@kevinearls.com>
Authored: Fri Mar 28 17:33:41 2014 +0100
Committer: Kevin Earls <kevin@kevinearls.com>
Committed: Fri Mar 28 17:33:41 2014 +0100

----------------------------------------------------------------------
 .../activemq/OnePrefetchAsyncConsumerTest.java  | 23 ++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4faf11d8/activemq-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
index 578dad9..0851198 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
@@ -37,10 +37,17 @@ import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.util.Wait;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 // see: https://issues.apache.org/activemq/browse/AMQ-2651
+@RunWith(BlockJUnit4ClassRunner.class)
 public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport {
     private static final Logger LOG = LoggerFactory.getLogger(OnePrefetchAsyncConsumerTest.class);
 
@@ -50,6 +57,8 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport
{
     private final AtomicBoolean completed = new AtomicBoolean();
     private final AtomicBoolean success = new AtomicBoolean();
 
+    @Ignore("https://issues.apache.org/jira/browse/AMQ-5126")
+    @Test(timeout = 60 * 1000)
     public void testPrefetchExtension() throws Exception {
         Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
         MessageProducer producer = session.createProducer(queue);
@@ -83,8 +92,8 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport
{
         return new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString());
     }
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         setAutoFail(true);
         bindAddress = "tcp://localhost:0";
         super.setUp();
@@ -96,8 +105,8 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport
{
         connection.start();
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         connectionConsumer.close();
         connection.close();
         super.tearDown();
@@ -169,10 +178,14 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport
{
                     session.run();
 
                     // commit the tx and return ServerSession to pool
+                    LOG.debug("Waiting on pool");
                     synchronized (pool) {
                         try {
+                            LOG.debug("About to call session.commit");
                             session.commit();
+                            LOG.debug("Commit completed");
                         } catch (JMSException e) {
+                            LOG.error("In start", e);
                         }
                         pool.serverSessionInUse = false;
                     }
@@ -199,7 +212,9 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport
{
                     TimeUnit.SECONDS.sleep(4);
                 }
             } catch (JMSException e) {
+                LOG.error("in onMessage", e);
             } catch (InterruptedException e) {
+                LOG.error("in onMessage",e);
             }
         }
     }


Mime
View raw message