jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1823408 - in /jmeter/trunk: src/core/org/apache/jmeter/threads/JMeterThread.java xdocs/changes.xml
Date Tue, 06 Feb 2018 22:27:06 GMT
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

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=1823408&r1=1823407&r2=1823408&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterThread.java Tue Feb  6 22:27:06
2018
@@ -515,12 +515,14 @@ public class JMeterThread implements Run
             threadContext.setPreviousResult(result);
             runPostProcessors(pack.getPostProcessors());
             checkAssertions(pack.getAssertions(), result, threadContext);
-            // Do not send subsamples to listeners which receive the transaction sample
-            List<SampleListener> sampleListeners = getSampleListeners(pack, transactionPack,
transactionSampler);
-            notifyListeners(sampleListeners, result);
+            if (!result.isIgnore()) {
+                // Do not send subsamples to listeners which receive the transaction sample
+                List<SampleListener> sampleListeners = getSampleListeners(pack, transactionPack,
transactionSampler);
+                notifyListeners(sampleListeners, result);
+            }
             compiler.done(pack);
             // Add the result as subsample of transaction if we are in a transaction
-            if (transactionSampler != null) {
+            if (transactionSampler != null && !result.isIgnore()) {
                 transactionSampler.addSubSamplerResult(result);
             }
 

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1823408&r1=1823407&r2=1823408&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Tue Feb  6 22:27:06 2018
@@ -248,6 +248,7 @@ itself does not have to be edited anymor
     <li><bug>61549</bug>Thread Group: Remove start and end date</li>
     <li><bug>61529</bug>Migration to Java 9. Partly contributed by Ubik
Load Pack (support at ubikloadpack.com)</li>
     <li><bug>61709</bug>SampleResult: Add a method <code>setIgnore()</code>
to make JMeter ignore the SampleResult and not send it to listeners</li>
+    <li><bug>61806</bug>Allow to use <code>SampleResult#setIgnore()</code>
in post-processors and assertions script (JSR223 elements)</li>
     <li><bug>61607</bug>Add browse button in all BeanShell elements to
select BeanShell script</li>
     <li><bug>61627</bug>Don't clear LogView anymore when clicking on Warning/Errors
Indicator</li>
     <li><bug>61629</bug>Add Think Times to Children menu should not consider
disabled elements</li>



Mime
View raw message