You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/03/30 08:57:49 UTC

[Bug 60933] JMeter don't wait to stop for thread create on the fly by the API 'addNewThread'

https://bz.apache.org/bugzilla/show_bug.cgi?id=60933

maxime.chassagneux@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
           Severity|normal                      |major

--- Comment #1 from maxime.chassagneux@gmail.com ---
The problem is that JMeter wait for threads stop with looping on allThreads map
( see @ThreadGroup => waitThreadsStopped() method )
This map is initiate by the StandardJMeterEngine, and the loop is not updated
on the fly when a new thread is added.

A quick fix is to check if the map is not empty and iterate again like this : 

        while ( !allThreads.isEmpty() ) {
            for (Thread t : allThreads.values()) {
                waitThreadStopped(t);
            }
        }

Any advice to fix it ?

-- 
You are receiving this mail because:
You are the assignee for the bug.