activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r906861 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
Date Fri, 05 Feb 2010 09:13:39 GMT
Author: gtully
Date: Fri Feb  5 09:13:39 2010
New Revision: 906861

URL: http://svn.apache.org/viewvc?rev=906861&view=rev
Log:
tidy up and enable auto fail as this hangs in 5.3 for some reason. stack trace will help diagnose

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java?rev=906861&r1=906860&r2=906861&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java Fri
Feb  5 09:13:39 2010
@@ -48,7 +48,7 @@
     BrokerService broker;
     private ActiveMQConnectionFactory factory;
 
-    private static final int HANG_THRESHOLD = 30;
+    private static final int HANG_THRESHOLD = 60;
     private static final int SEND_COUNT = 10000;
     private static final int RECEIVER_THINK_TIME = 1;
     private static final int CONSUMER_COUNT = 1;
@@ -94,7 +94,7 @@
 
         factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:2401");
         //factory = new ActiveMQConnectionFactory("vm://localhost?broker.useJmx=false&broker.persistent=false");
-
+        setAutoFail(true);
         super.setUp();
     }
 
@@ -133,7 +133,7 @@
                 producer.start();
                 services.add(producer);
             }
-            waitForMessageReceipt(300000);
+            waitForMessageReceipt();
 
         } finally {
             if (p != null) {
@@ -172,8 +172,7 @@
      * @throws TimeoutException
      * 
      */
-    private void waitForMessageReceipt(long timeout) throws InterruptedException, TimeoutException
{
-        // TODO Auto-generated method stub
+    private void waitForMessageReceipt() throws InterruptedException, TimeoutException {
         try {
             while (count.get() < SEND_COUNT) {
                 if (!receivedMessages.tryAcquire(HANG_THRESHOLD, TimeUnit.SECONDS)) {



Mime
View raw message