activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r585215 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/PerfProducer.java
Date Tue, 16 Oct 2007 18:25:18 GMT
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();
     }
 



Mime
View raw message