https://bz.apache.org/bugzilla/show_bug.cgi?id=64704

--- Comment #5 from eR@SeR <[email protected]> ---
Groovy flavor RegEx is used, not Java, but might have the same problem. Actual
performance issue has a method "matches()". You can try by removing it from
"if" and you'll see that result is got almost immediately.

In regular check, it goes in one iteration (line 9), but if it fails, then it
checks all substrings in the response body until it finds where fail happened
which can last a lot depending on string length. Why I chose to go this way is
to avoid creating dozens of JSON extractors and dozen of assertions in my test
plan. Of course, this validation is used in the functional tests, not load one.

I managed to interrupt Thread.sleep(5000) method immediately. What is the
difference?

Provided Regex should fail if JSON Schema or parameter value is not matching
defined criteria. I would not say 'brittle', then the best validation method
with a lack of performance for a huge response body, unfortunately. If you have
better approach to use it in one go, I would like to hear it :)

Nevertheless, the goal is how to stop JMeter test in case code execution is in
progress, not about actual code, right :)

Is it possible to fix it somehow?

P.S. Thank you for the suggestion, I found the Dummy sampler more appropriate,
but I might try JSR223 Sampler.

Cheers

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to