Hello i have the following problem :I have a Thread group "X" which has a sampler that creates a document in a system. Thread group "Y" has a sampler which takes the document ID from thread group "X" - both actions must be performed by a different user one by one and than continue the execution of their other samplers that's why i have put them in a different thread groups (they are performing different visitor scenarios). If i use "Run thread groups consecutively" the second document ID is the only one which is passed to Thread group "Y". The best resolution for me would be if there is a way to tell thread group "Y" to sleep just before asking for the document for a time just after the document has being created in Thread group "X" ?
0
votes
1 Answers
2
votes
From what i understand from this question, You do not want to use Run thread groups consecutively
. But somehow you want the threadgroup Y to wait for a sample to finish in threadgroup X.
If so, You can create a property in thread group X
${__setProperty("docid", ${yourdocumentid})}
;
You can access it in thread group Y by using a whil econtroller.
Use a while controller in thread group Y to make the threadgroup Y until the docid is set to a number other than 0 by thread group X. This will be the while loop condition.
${__javaScript("${__P(docid,0)}" == "0")}
You might want to change it back to 0 immediately.
you can also use Inter-Thread Communication plugin.