You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2020/12/18 23:24:41 UTC

[jmeter] branch master updated: Bug 65008 - SampleResult.setIgnore() called from PostProcessor is not considered

This is an automated email from the ASF dual-hosted git repository.

pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 9841a2a  Bug 65008 - SampleResult.setIgnore() called from PostProcessor is not considered
9841a2a is described below

commit 9841a2a64f8f908bfa97967b46636735e09b0826
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sat Dec 19 00:23:46 2020 +0100

    Bug 65008 - SampleResult.setIgnore() called from PostProcessor is not
    considered
---
 .../src/main/java/org/apache/jmeter/threads/JMeterThread.java    | 9 ++++++---
 xdocs/changes.xml                                                | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
index dfe13e5..9084fd4 100644
--- a/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
+++ b/src/core/src/main/java/org/apache/jmeter/threads/JMeterThread.java
@@ -572,9 +572,12 @@ public class JMeterThread implements Runnable, Interruptible {
                 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);
+                // PostProcessors can call setIgnore, so reevaluate here
+                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 && !result.isIgnore()) {
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 836c80b..f39009d 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -181,6 +181,7 @@ Summary
   <li><bug>64963</bug>Blank comment tooltip is visible</li>
   <li><bug>64969</bug>RemoteJMeterEngineImpl#rexit doesn't unexport RemoteJMeterEngineImpl on exit. Contributed by luo_isaiah at qq.com</li>
   <li><bug>64984</bug>Darklaf LAF: Selecting a Test element does not work under certain screen resolutions on Windows. With the help of Jannis Weis</li>
+  <li><bug>65008</bug>SampleResult.setIgnore() called from PostProcessor is not considered</li>
 </ul>
 
  <!--  =================== Thanks =================== -->