'How to stop the concurrency between two transaction controller in two different thread groups

Here is my problem, I have two different thread groups which contains two different transaction controller named Upload a CSV file and Upload a XLS file to my target application. Is there any way I can prevent the concurrency between these two controller. Basically the objective is at same point of time two or more than two files (CSV and XLS type) shouldn't upload to my system.

At current I have put a Random Timers, like in the first thread group I am generating a value between 1sec-5sec and in the second thread group I am using 6sec-10sec. (please check the image)

Think Timer for CSV:

enter image description here

Think Timer for XLS:

enter image description here

Is there any better approach to do this? where non of the file upload should be at the same time.

Note: I am using all different set of users for these two request.



Solution 1:[1]

  1. Do you realize that given your requirement you will be able to upload only one file at a time therefore it doesn't make a lot of sense to use more than one thread and to have more than one thread group?

Whatever.

  1. There is a Critical Section Controller which ensures that it's child(ren) are only run using one thread at a time
  2. You can also consider using Inter-Thread Communication Plugin so i.e. upload XLS will wait until upload CSV is done or vice versa.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1