jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject [jmeter] branch master updated: Bug 64475 - Menu Generate HTML Report: When report generation fails due to timeout, error message is not explicit
Date Sat, 25 Jul 2020 13:26:55 GMT
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 fb40439  Bug 64475 - Menu Generate HTML Report: When report generation fails due
to timeout, error message is not explicit
fb40439 is described below

commit fb404396cc96139c2b94207478a73da23ad04144
Author: pmouawad <p.mouawad@ubik-ingenierie.com>
AuthorDate: Sat Jul 25 15:25:55 2020 +0200

    Bug 64475 - Menu Generate HTML Report: When report generation fails due
    to timeout, error message is not explicit
---
 .../org/apache/jmeter/gui/action/HtmlReportGenerator.java    | 12 +++++++++---
 .../org/apache/jmeter/resources/messages.properties          |  3 ++-
 .../org/apache/jmeter/resources/messages_fr.properties       |  3 ++-
 xdocs/changes.xml                                            |  2 ++
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
b/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
index a4c1e8f..41cf95f 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/action/HtmlReportGenerator.java
@@ -87,9 +87,15 @@ public class HtmlReportGenerator {
                 LOGGER.info("The HTML report generation failed and returned: {}", commandExecutionOutput);
                 return errorMessageList;
             }
-        } catch (InterruptedException | TimeoutException | IOException e) {
-            errorMessageList.add(commandExecutionOutput.toString());
-            LOGGER.error("Error during HTML report generation:", e);
+        } catch (TimeoutException e) {
+            errorMessageList.add(MessageFormat.format(JMeterUtils.getResString("generate_report_ui.html_report_timeout_error"),
+                    COMMAND_TIMEOUT, e.getMessage(), commandExecutionOutput.toString()));
+            LOGGER.error("Report generation took more time than configured timeout(Property
{}={})",
+                    "generate_report_ui.generation_timeout", COMMAND_TIMEOUT, commandExecutionOutput.toString(),
e);
+        } catch (InterruptedException | IOException e) {
+            errorMessageList.add(MessageFormat.format(JMeterUtils.getResString("generate_report_ui.html_report_unknown_error"),
+                    e.getMessage(), commandExecutionOutput.toString()));
+            LOGGER.error("Error during HTML report generation, executing {}", commandExecutionOutput.toString(),
e);
             if (e instanceof InterruptedException) {
                 Thread.currentThread().interrupt();
             }
diff --git a/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties b/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
index 1489b45..f598f6f 100644
--- a/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
+++ b/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
@@ -414,7 +414,8 @@ generate_report_ui.html_report_menu=Generate HTML report
 generate_report_ui.html_report_processing=Generating report
 generate_report_ui.html_report_request=Generate report
 generate_report_ui.html_report_success=Report created !
-generate_report_ui.html_report_unknown_error=Error \: {0}
+generate_report_ui.html_report_timeout_error=Generation of report took more time than configured
timeout (Property generate_report_ui.generation_timeout={0}), error\:{1}, command output\:{2}
+generate_report_ui.html_report_unknown_error=Error generating report \: {0}, command output\:{1}
 generate_report_ui.no_such_file=The specified file {0} doesn't exist
 generate_report_ui.output_directory=Output directory \:
 generator_cnf_msg=Could not find the generator class. Please make sure you place your jar
file in the /lib directory.
diff --git a/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
b/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
index 9e04a2d..c43d7d7 100644
--- a/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
+++ b/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
@@ -408,7 +408,8 @@ generate_report_ui.html_report_menu=Générer le rapport HTML
 generate_report_ui.html_report_processing=Génération en cours
 generate_report_ui.html_report_request=Générer le rapport
 generate_report_ui.html_report_success=Rapport créé !
-generate_report_ui.html_report_unknown_error=Erreur \: {0}
+generate_report_ui.html_report_timeout_error=La génération du rapport a pris plus de temps
que le timeout configuré(Propriété generate_report_ui.generation_timeout={0}), erreur\:{1},
sortie standard\:{2}
+generate_report_ui.html_report_unknown_error=Erreur lors de la génération du rapport \:
{0}, sortie standard\:{1}
 generate_report_ui.no_such_file=Le fichier spécifié {0} n'existe pas
 generate_report_ui.output_directory=Répertoire de sortie \ :
 generator_cnf_msg=N'a pas pû trouver la classe génératrice. Assurez-vous que vous avez
placé votre fichier jar dans le répertoire /lib
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 022d540..c7df4ed 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -176,6 +176,7 @@ Summary
     <li><bug>64510</bug>Darklaf- IntelliJ Theme throws NPE in DarkTreeUI
on MacOS</li>
     <li><bug>64543</bug>On MacOSX, Darklaf- IntelliJ Theme throws NPE in
javax.swing.ToolTipManager.initiateToolTip</li>
     <li><bug>64594</bug>Unable to enter variable values instead of numeric
values in components using PowerTableModel (Impacts 3rd party plugins like Throughput Shaping
Timer)</li>
+    <li><bug>64475</bug>Menu Generate HTML Report: When report generation
fails due to timeout, error message is not explicit. Contributed by Ubik Load Pack (https://ubikloadpack.com)</li>
 </ul>
 
  <!--  =================== Thanks =================== -->
@@ -190,6 +191,7 @@ Summary
   <li><a href="https://ubikloadpack.com" >Ubik Load Pack</a></li>
   <li><a href="https://github.com/weisJ/darklaf">Jannis Weis</a></li>
   <li><a href="https://github.com/topicus-pw-dvdouden">Daniel van den Ouden</a></li>
+  <li><a href="https://ubikloadpack.com" >Ubik Load Pack</a></li>
 </ul>
 <p>We also thank bug reporters who helped us improve JMeter.</p>
 <ul>


Mime
View raw message