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 2022/05/09 19:40:12 UTC

[jmeter] branch master updated: Revert Bugfix 65885 (#709)

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 a997ed23ce Revert Bugfix 65885 (#709)
a997ed23ce is described below

commit a997ed23ce0f9625f92f98314b22d09a6ac96dd6
Author: Philippe M <pm...@users.noreply.github.com>
AuthorDate: Mon May 9 21:40:06 2022 +0200

    Revert Bugfix 65885 (#709)
    
    * Revert Bugfix 65885
    
    * Update changes
    
    * Fix style violation
---
 .../java/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java | 3 ++-
 .../org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java  | 3 ---
 xdocs/changes.xml                                                      | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java b/src/core/src/main/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
index 3b8d3b5ae9..982198b921 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
@@ -97,7 +97,8 @@ public class ErrorsSummaryConsumer extends AbstractSummaryConsumer<Long> {
                  "/" + escapeJson(responseMessage) : "");
 
         if (MetricUtils.isSuccessCode(responseCode) ||
-                StringUtils.isNotBlank(sample.getFailureMessage())) {
+                (StringUtils.isEmpty(responseCode) &&
+                   StringUtils.isNotBlank(sample.getFailureMessage()))) {
             key = MetricUtils.ASSERTION_FAILED;
             if (ASSERTION_RESULTS_FAILURE_MESSAGE) {
                 String msg = sample.getFailureMessage();
diff --git a/src/core/src/test/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java b/src/core/src/test/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java
index 9a41be978e..d236771725 100644
--- a/src/core/src/test/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/report/processor/ErrorsSummaryConsumerTest.java
@@ -57,9 +57,6 @@ public class ErrorsSummaryConsumerTest {
         sample = new Sample(0, metadata, new String[] { "false", "403", "", "" });
         assertEquals("403", ErrorsSummaryConsumer.getErrorKey(sample));
 
-        sample = new Sample(0, metadata, new String[] { "false", "403", "", "FailureMessage" });
-        assertEquals("FailureMessage", ErrorsSummaryConsumer.getErrorKey(sample));
-
         sample = new Sample(0, metadata, new String[] { "false", "500", "Server Error", "" });
         assertEquals("500/Server Error", ErrorsSummaryConsumer.getErrorKey(sample));
     }
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 805216f8e2..11130ddc2b 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -147,7 +147,6 @@ however, the profile can't be updated while the test is running.
 <h3>Report / Dashboard</h3>
 <ul>
   <li><bug>65353</bug>Make the estimator used for calculating percentiles on the dashboard configurable</li>
-  <li><bug>65885</bug>HTML Report: Error report displays wrong failure message when Response Assertion checks Ignore Status and response code is not 200</li>
 </ul>
 
 <h3>General</h3>