jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60933] JMeter don't wait to stop for thread create on the fly by the API 'addNewThread'
Date Thu, 30 Mar 2017 08:57:49 GMT
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.
Mime
View raw message