You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2007/10/16 20:25:18 UTC

svn commit: r585215 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java

Author: rajdavies
Date: Tue Oct 16 11:25:17 2007
New Revision: 585215

URL: http://svn.apache.org/viewvc?rev=585215&view=rev
Log:
don't wait for ever to stop

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java?rev=585215&r1=585214&r2=585215&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java Tue Oct 16 11:25:17 2007
@@ -17,6 +17,7 @@
 package org.apache.activemq.perf;
 
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import javax.jms.BytesMessage;
 import javax.jms.Connection;
@@ -62,7 +63,9 @@
             rate.reset();
             running = true;
             connection.start();
-            new Thread(this).start();
+            Thread t = new  Thread(this);
+            t.setName("Producer");
+            t.start();
         }
     }
 
@@ -70,7 +73,7 @@
         synchronized (this) {
             running = false;
         }
-        stopped.await();
+        stopped.await(1,TimeUnit.SECONDS);
         connection.stop();
     }