You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Dimas Kotvan <dk...@discover.com.br> on 2006/10/19 15:34:47 UTC

How to make a thread wait for another?

Hello all,
I'm trying to simulate the following behavior with JMeter:

       Group 1                    Group 2
Thread 1     Thread 2       Thread 3    Thread 4
Request A    Request B 1    Request A    Request B 1
             Request B 2            Request B 2
             Request B 3            Request B 3
             Request B 4            Request B 4
Request A    Request B 1    Request A    Request B 1
             Request B 2            Request B 2
             Request B 3            Request B 3
             Request B 4            Request B 4

Every group of two threads will simulate a transaction.
The thread 1 and 2 need to start at same time then the thread 1 wait
the thread 2 finish to start again. The same happens with threads 3 and 4.

I'm trying to make a test plan with a complicated set of Synchronizing Timers
and If Controllers, but I can´t make it work. 

Is this possible? Anyone has an idea of how I can do this?

Thanks in advance,
Dimas Kotvan

Re: How to make a thread wait for another?

Posted by sebb <se...@gmail.com>.
The Synchronizing Timer only works within a single Thread Group, sorry.

It might be possible to extend it so that it also worked across thread
groups - c.f. the Constant Throughput Timer.

I suggest you open a Bugzilla enhancement request.

If you are compent in Java, it should be possible to use a BeanShell
timer to achieve this [but you'll need to work this out for yourself.]

JMeter threads normally represent independent users ...

S.
On 19/10/06, Dimas Kotvan <dk...@discover.com.br> wrote:
> Hello all,
> I'm trying to simulate the following behavior with JMeter:
>
>       Group 1                    Group 2
> Thread 1     Thread 2       Thread 3    Thread 4
> Request A    Request B 1    Request A    Request B 1
>             Request B 2            Request B 2
>             Request B 3            Request B 3
>             Request B 4            Request B 4
> Request A    Request B 1    Request A    Request B 1
>             Request B 2            Request B 2
>             Request B 3            Request B 3
>             Request B 4            Request B 4
>
> Every group of two threads will simulate a transaction.
> The thread 1 and 2 need to start at same time then the thread 1 wait
> the thread 2 finish to start again. The same happens with threads 3 and 4.
>
> I'm trying to make a test plan with a complicated set of Synchronizing Timers
> and If Controllers, but I can´t make it work.
>
> Is this possible? Anyone has an idea of how I can do this?
>
> Thanks in advance,
> Dimas Kotvan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org