Reputation: 63
I'm using TCP sampler to send a text type message. The thing is, I'm getting the response that I wanted but the JMeter's test run doesn't stop its-self after getting the response. Each time I've to click on the STOP button and then I get the response with a 500 error saying that "the server is unable to read from the server".
I've tried the following things:
Non of the above things work. If anyone has a better solution for this kindly guide. I've seen some solutions saying "use JSR223 sampler to send requests" but I don't know its code tried writing the code too but failed. Anyone please?
Upvotes: 0
Views: 914
Reputation: 168247
We don't know your server implementation, JMeter will attempt to read until the connection and the input stream are open, it expects the server to close the connection after receiving the response.
You need to either come up with your own implementation of the AbstractTCPClient and set it via "TCPClient classname"
or just specify a reasonable response timeout:
JMeter will mark the sampler as failed due to read timeout however you should be able to suppress this error by adding a Response Assertion configured like:
another pass/fail criteria could be added similarly
Upvotes: 0