Bug 61806 - Allow to use SampleResult#setIgnore() in post-processors and assertions script (JSR223 elements)
Summary: Allow to use SampleResult#setIgnore() in post-processors and assertions scrip...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
: 54333 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-11-23 15:53 UTC by mchassagneux
Modified: 2019-03-04 10:26 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mchassagneux 2017-11-23 15:53:00 UTC
Actually, the new setIgnore() method allow to not send the sampleResut to all listener. 
But you have to set the propertie in the sampler, you can't change it on a post-processor or in a assertion script. 

I think it could be usefull to allow this behaviour. 

Actually, I check in a assertion script if a JMS subscriber sampler got a 404 as code result ( i.e timeout , no message in the queue, but it's just a purge thread group, so I don't care) and I rly don't want to pollute my result with this.

For me, we just need to check the ignore status before send to listener result like this =>

runPostProcessors(pack.getPostProcessors());
checkAssertions(pack.getAssertions(), result, threadContext);
if ( !result.isIgnore() ) {
   // Do not send subsamples to listeners which receive the transaction sample
   List<SampleListener> sampleListeners = getSampleListeners(pack, transactionPack, transactionSampler);
   notifyListeners(sampleListeners, result);
}
Comment 1 Philippe Mouawad 2018-02-06 22:14:35 UTC
https://github.com/apache/jmeter/pull/341
Comment 2 Philippe Mouawad 2018-02-06 22:27:25 UTC
Author: pmouawad
Date: Tue Feb  6 22:27:06 2018
New Revision: 1823408

URL: http://svn.apache.org/viewvc?rev=1823408&view=rev
Log:
Bug 61806 - Allow to use SampleResult#setIgnore() in post-processors and assertions script (JSR223 elements)
This closes #341
Contributed by Maxime Chassagneux
Bugzilla Id: 61806

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
    jmeter/trunk/xdocs/changes.xml
Comment 3 Philippe Mouawad 2019-03-04 10:26:48 UTC
*** Bug 54333 has been marked as a duplicate of this bug. ***
Comment 4 The ASF infrastructure team 2022-09-24 20:38:11 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4608