Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75297D780 for ; Tue, 26 Jun 2012 23:41:21 +0000 (UTC) Received: (qmail 74672 invoked by uid 500); 26 Jun 2012 23:41:21 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 74645 invoked by uid 500); 26 Jun 2012 23:41:21 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 74636 invoked by uid 99); 26 Jun 2012 23:41:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 23:41:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 23:41:20 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4C88A2388A02 for ; Tue, 26 Jun 2012 23:41:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1354291 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java Date: Tue, 26 Jun 2012 23:41:00 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120626234100.4C88A2388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Tue Jun 26 23:40:59 2012 New Revision: 1354291 URL: http://svn.apache.org/viewvc?rev=1354291&view=rev Log: apply patch for: https://issues.apache.org/jira/browse/AMQ-3900 Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java?rev=1354291&r1=1354290&r2=1354291&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java (original) +++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java Tue Jun 26 23:40:59 2012 @@ -27,6 +27,7 @@ import javax.jms.MessageProducer; import javax.jms.Session; import junit.framework.TestCase; + import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.region.policy.PolicyEntry; @@ -82,7 +83,6 @@ public class TopicProducerFlowControlTes broker.waitUntilStarted(); } - protected void tearDown() throws Exception { broker.stop(); broker.waitUntilStopped(); @@ -138,19 +138,17 @@ public class TopicProducerFlowControlTes assertEquals("Didn't produce all messages", numMessagesToSend, produced.get()); assertEquals("Didn't consume all messages", numMessagesToSend, consumed.get()); - } @Override public void onMessage(Message message) { - try { - Thread.sleep(1); - } catch (InterruptedException e) { - } - long count = consumed.incrementAndGet(); if (count % 100 == 0) { LOG.info("\tConsumed " + count + " messages"); + try { + Thread.sleep(100); + } catch (InterruptedException e) { + } } } }