Jmeter - All threads other than current thread wait
morde last edited by
I am new to Jmeter and I have been struggling with my test plan.
Test plan steps:
- Enters the site
- Creates multiple wish lists (like the wish list on amazon)
- In the wish list dashboard the order of the list is constantly updated based on the most recently edited list on the top of the page
- I have multiple threads entering this dashboard and editing the wish lists
- I am using multiple if statements to validate the position of the wish list (based on name) the current thread wants to modify.
- The problem is that after that if statement when I try to click edit (POST request) on the desired wish list associated with the current thread the page crashes
- The reason behind the crash is a race condition. Before I can post the position of the page, the location changes (another thread has created or modified a wish list)
- I have tried using Critical Section Control but that will not work be because the other thread can be working on editing the wish list which can change the order on the dashboard.
- Is there a way on Jmeter where I can pause the all the thread other than the current thread when I am at the Dashboard Post request?
- If your application should allow concurrent modification of the same wish list by different users - it's an application bug which needs to be resolved
- If your application doesn't allow concurrent modification of the same wish list by different users - your test is badly designed, you need to amend it and ensure that each thread (virtual user) is using different wish list. There is __threadNum() function which allows getting the ID of current thread (virtual user), you can use this information in order to distinguish users/threads
- If your scenario is more complex you can consider using i.e. Inter-Thread Communication Plugin, you can implement whatever scenario of IPC you want using it. Inter-Thread Communication Plugin can be installed using JMeter Plugins Manager