Suren
Suren

Reputation: 11

JMeter - How to handle Longpolling transport method

One of the Jmeter requests which I captured contains the 'LongPolling' transport method. So it takes high load time/latency.

I don't want to have this much of high latency in the request. How can I handle this situation in JMeter. I have already tried 'bzm-Parallel Controller' and it was not success. enter image description here

Upvotes: 1

Views: 718

Answers (2)

Dmitri T
Dmitri T

Reputation: 168002

Just add a connect and/or response timeout, it can be done under "Advanced" tab of the HTTP Request sampler.

enter image description here

If you have more than one HTTP Request sampler and want to apply timeout setting to all of them - go for HTTP Request Defaults.

In case you want to mark the HTTP Request which times out as not failed you can go for Response Assertion

enter image description here

Upvotes: 0

Ori Marko
Ori Marko

Reputation: 58774

You can Insert Parent (Right Click) a Runtime Controller with 1 second, it'll execute your long request, but will wait only 1 second and continue to next requests

Notice that it'll be marked as failed due to java.net.ConnectException

If you want you can add a child JSR223 PostProcessor with the following code to mark it successful

prev.setSuccessful(true);

setSuccessful method can override results status

Upvotes: 0

Related Questions