Setup the following: Thread Group: 2 thread, RU 1, Loop 1 -Java sampler logon -Throughput Controller set at 1 for total executions (NOT per user) -Java sampler Browse to folderA -Throughput Controller set at 1 for total executions (NOT per user) -Java sampler Browse to folderB -Aggregate Report I would expect to see the samplers for Browse to folderA and folderB to both execute just the once for which ever of the two threads executed it first. However, only the second Browse sampler occurs - Browse folder B . NOTE: 1) OS is virtualised Windows Server 2003 R2 2) If I set both Throughput Controllers to be per user. I get each Browse completed twice in total, once per user, as expected.
After analysis, the problem is the element Throughput Controller when there are several in same Thread Group with the option "Per User" unchecked. ==> The problem doesn't exist when option "Per User" is checked. The analysis of source code indicates that scope of variable globalNumExecutions in class org.apache.jmeter.control.ThroughputController which is the cause of problem. Indeed, variable globalNumExecutions is compared to getMaxThroughputAsInt() (in method decide() of the same class), but unfortunately, value of globalNumExecutions is shared by all Throughput Controller of Thread Group. When comparing the number of execution is wrong in relation to the current Throughput Controller. For example, in Test Plan attached, the request "21 HTTP Request" isn't success because the comparison of value of globalNumExecutions is already 1 (because request "11 HTTP Request" is before) and value of Max Throughput is 1 for the current Throughput Controller (1 < 1 = false). The solution should be (I think): A variable globalNumExecutions by Throughput Controller and shared by Thread Group. By cons, I have not (yet) succeeded to correct in the source code Jmeter ... Perhaps this is not possible?
Created attachment 22534 [details] Test Plan to show bug 44941
URL: http://svn.apache.org/viewvc?rev=712458&view=rev Log: Bug 44941 - Throughput controllers should not share global counters
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2107