2
votes

When I'm using Synchronizing Timer set by threads (Number of Simultaneous Users to Group by) it works well except when using with Thread group's duration,

When it's used together the test hang, probably because of Synchronizing issue, as documented:

If timeout in milliseconds is set to 0 and number of threads never reaches "Number of Simultaneous Users to Group by" then Test will pause infinitely. Only a forced stop will stop it. Setting Timeout in milliseconds is an option to consider in this case.

Also Runtime Controller isn't a valid replacement for limiting the duration,

Is there other way to limit test duration, but still use some kind of Synchronization of threads?

Can I add a hook using JSR233 Sampler when test duration over and stop all threads?

I'm thinking of using Precise Throughput Timer, but it seems over complicated for this specific requirement.

EDIT

I can make test no hang if I put a value in Timeout in milliseconds with value higher than expected in a normal flow, as 10 seconds, 10000, and then after 10 seconds the test stops, but I'm not sure it fixes the issue completely.

1

1 Answers

1
votes

This looks like a bug in stopping test, you should report it with a reproducer.

I think end of test is not detected and it should.

Edit:

You created issue:

It was fixed and will be available in JMeter 5.0