jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

When the life of a thread expires, the requests inside are terminated halfway.

Open CatPrincess69 opened this issue 7 months ago • 1 comments

When the life of a thread expires, the requests inside are terminated halfway.

I have a thread that runs for 1 minute

There is a transaction controller inside it and inside it there are 5 requests that are executed sequentially

From creating an entity to deleting it. The problem is that as soon as the time runs out, the thread is killed and the CRUD cycle for the entity is terminated halfway. How can I make the thread work in time and at the same time if the thread has already started working, then after the time has elapsed, it simply performs all its operations inside until the end

CatPrincess69 avatar May 12 '25 07:05 CatPrincess69

There's a catch on what to do when the time runs out. Should you wait indefinitely? Should you wait for some amount of time?

There's a workaround if you use Open Model Thread Group: you could add pause(2 min) at the end of the schedule, so it would allow thread to complete before forcefully interrupting them.


We could consider adding a "non-interruptible" controller which would allow users to protect a part of a test plan from interrupting, however, we can't let it hang indefinitely, so it should have a timeout so it still terminates sooner or later.


A similar option would be having "cleanup" actions which would execute when an operation fails:

  • https://github.com/apache/jmeter/issues/4612

vlsi avatar May 12 '25 13:05 vlsi