- changed status to open
close needs to consume other messages prior to checking for close response
I open a websocket and close it at the end of my jmeter test. I don't really care what happens on it right now. Some session see a callback and others don't. The WebSocket Close sampler errors out saying "received not a close frame, but a Text frame with text {}.
I don't see a sampler that can consume and discard a message. I think that would still be subject to race conditions. Does the spec really state that the server has to discard all previous messages prior to sending a close response? Is that possible? Are they buffered in the server application code, server networking layer, on the wire, client networking layer, client application layer? I'm testing against a TomEE websocket implemented with @ServerEndpoint.
Comments (2)
-
repo owner -
repo owner If you checkout the filter branch and build the plugin, you can use a close sampler in combination with a (text frame) filter, which will exactly behave the way you want. See the "Smart close with filter sample.jmx" in the samples directory (for the time being: on filter branch only) for a nice example: https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/ca6af7c7db2d808c4162f63bf25138e6c9ce3095/samples/Smart%20close%20with%20filter%20sample.jmx?at=filter&fileviewer=file-view-default
- Log in to comment
Hi Scott,
Thanks for the feedback. I agree that the Close Sampler should ignore/consume other messages, or at least it should offer the possibility to do so.