You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2020/07/06 11:22:17 UTC
[GitHub] [jmeter] pmouawad opened a new pull request #604: Bug 64581 - Allow SampleResult#setIgnore to influence behaviour on Sampler Error
pmouawad opened a new pull request #604:
URL: https://github.com/apache/jmeter/pull/604
## Description
See:
https://bz.apache.org/bugzilla/show_bug.cgi?id=64581
When SampleResult#isIgnore() is true, use is for impacting algorithmic
execution, it will be taken into account to:
- Decide what to do on Error ("Action to be taken after a Sampler error"
in Thread Group)
- set JMeterThread.last_sample_ok
Fix also misnamed lastSampleInError to lastSampleOk
## Motivation and Context
In version 4.0 of JMeter this method was introduced:
https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html#setIgnore--
The aim was to provide the ability to custom tester code (JSR Sampler, PostProcessor) to not emit the SampleResult to listeners.
The current implementation is not be fully ok.
Currently , due to this:
https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L561
The SampleResult is not considered to decide on what to do:
https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L586
Besides, currently this condition is useless so it will be fixed:
https://github.com/apache/jmeter/blob/master/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java#L574
This should be changed as user usually wants to influence whether we switch to next iteration, stop thread, test.
As a consequence, the enhancement will restrict this method to what its javadoc states:
- Don't sent
To avoid breaking existing code relying on it and because it looks correct, if ignore is set, we will not run:
- Post Processor on it as it is not supposed to concern real request on which user would like to extract data from response
- Assertion on it as it is not supposed to concern real request on which user would like to check some content
Considering its use is for impacting algorithmic execution, it will be taken into account to:
- Decide what to do on Error ("Action to be taken after a Sampler error" in Thread Group)
- set JMeterThread.last_sample_ok
## How Has This Been Tested?
Run set of test:
./gradlew test
## Types of changes
<!--- What types of changes does your code introduce? Delete as appropriate -->
- New feature (non-breaking change which adds functionality)
## Checklist:
- [X] My code follows the [code style][style-guide] of this project.
- [X] I have updated the documentation accordingly.
[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [jmeter] pmouawad merged pull request #604: Bug 64581 - Allow SampleResult#setIgnore to influence behaviour on Sampler Error
Posted by GitBox <gi...@apache.org>.
pmouawad merged pull request #604:
URL: https://github.com/apache/jmeter/pull/604
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org