activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r906864 - /activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
Date Fri, 05 Feb 2010 09:17:48 GMT
Author: gtully
Date: Fri Feb  5 09:17:48 2010
New Revision: 906864

URL: http://svn.apache.org/viewvc?rev=906864&view=rev
Log:
 merge -c 906861 https://svn.apache.org/repos/asf/activemq/trunk - tidy up and enable auto
fail as this hangs in 5.3 for some reason. stack trace will help diagnose

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

Modified: activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
URL: http://svn.apache.org/viewvc/activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java?rev=906864&r1=906863&r2=906864&view=diff
==============================================================================
--- activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
(original)
+++ activemq/branches/activemq-5.3/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2413Test.java
Fri Feb  5 09:17:48 2010
@@ -54,7 +54,7 @@
     BrokerService broker;
     private ActiveMQConnectionFactory factory;
 
-    private static final int HANG_THRESHOLD = 5;
+    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;
@@ -100,7 +100,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();
     }
 
@@ -139,7 +139,7 @@
                 producer.start();
                 services.add(producer);
             }
-            waitForMessageReceipt(300000);
+            waitForMessageReceipt();
 
         } finally {
             if (p != null) {
@@ -178,8 +178,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)) {
@@ -303,4 +302,4 @@
     public static Test suite() {
        return suite(AMQ2413Test.class);
      }
-}
\ No newline at end of file
+}



Mime
View raw message