jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mchassagn...@apache.org
Subject svn commit: r1795544 - /jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
Date Thu, 18 May 2017 16:30:42 GMT
Author: mchassagneux
Date: Thu May 18 16:30:42 2017
New Revision: 1795544

URL: http://svn.apache.org/viewvc?rev=1795544&view=rev
Log:
Wait for all threads stopped, even those add on the fly during a test 
Bugzilla Id: 60933

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java?rev=1795544&r1=1795543&r2=1795544&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java Thu May 18 16:30:42 2017
@@ -539,9 +539,16 @@ public class ThreadGroup extends Abstrac
         if (delayedStartup) {
             waitThreadStopped(threadStarter);
         }
-        for (Thread t : allThreads.values()) {
-            waitThreadStopped(t);
-        }
+        /* @Bugzilla 60933
+         * Like threads can be added on the fly during a test into allThreads
+         * we have to check if allThreads is rly empty before stop 
+         */
+        while ( !allThreads.isEmpty() ) {
+            for (Thread t : allThreads.values()) {
+                waitThreadStopped(t);
+            }
+        }   
+      
     }
 
     /**



Mime
View raw message