You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by mc...@apache.org on 2017/05/18 16:30:42 UTC

svn commit: r1795544 - /jmeter/trunk/src/core/org/apache/jmeter/threads/ThreadGroup.java

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);
+            }
+        }   
+      
     }
 
     /**