Bug 61806

Summary: Allow to use SampleResult#setIgnore() in post-processors and assertions script (JSR223 elements)
Product: JMeter - Now in Github Reporter: mchassagneux
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: haridara, p.mouawad
Priority: P2    
Version: 3.3   
Target Milestone: ---   
Hardware: All   
OS: All   

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