Updated JUnit to 4.13.2 and 5.8.1 (from 4.13.1 and 5.7.0).
-
Updated Apache log4j2 to 2.16.0 (from 2.13.3).
+
Updated Apache log4j2 to 2.17.0 (from 2.13.3).
Updated Miglayout to 5.3 (from 5.2).
Updated Neo4j Java driver to 4.3.3 (from 4.2.0).
Updated Objenesis to 3.2 (from 2.6).
From 610eeeb866b1fda23025787e70bf0a81d0e8740c Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sun, 19 Dec 2021 19:17:22 +0100
Subject: [PATCH 006/736] Update expected_release_jars.csv for log4j 2.17.0
---
src/dist/src/dist/expected_release_jars.csv | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index 52aaea2489c..8ef431f9fe3 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -94,10 +94,10 @@
792176,kotlinx-html-jvm-0.7.3.jar
191102,lets-plot-batik-2.2.0.jar
3995999,lets-plot-common-2.2.0.jar
-207909,log4j-1.2-api-2.17.0.jar
-301892,log4j-api-2.17.0.jar
-1789565,log4j-core-2.17.0.jar
-24258,log4j-slf4j-impl-2.17.0.jar
+208235,log4j-1.2-api-2.17.0.jar
+301776,log4j-api-2.17.0.jar
+1789339,log4j-core-2.17.0.jar
+24252,log4j-slf4j-impl-2.17.0.jar
519087,mail-1.5.0-b01.jar
106949,miglayout-core-5.3.jar
22576,miglayout-swing-5.3.jar
From ac47049163a20bf2982911829e0e457fa7dd0641 Mon Sep 17 00:00:00 2001
From: Milamber
Date: Fri, 24 Dec 2021 16:06:29 +0100
Subject: [PATCH 007/736] Add the 5.4.3 release
---
doap_JMeter.rdf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doap_JMeter.rdf b/doap_JMeter.rdf
index 24d6f555584..414ac06cdcd 100644
--- a/doap_JMeter.rdf
+++ b/doap_JMeter.rdf
@@ -307,6 +307,13 @@
5.4.2 final
+
+
+ Apache JMeter
+ 2021-12-24
+ 5.4.3 final
+
+
From 3236c61a94ef0fddb5549d8887b2e714ac772b12 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Tue, 14 Dec 2021 19:56:02 +0300
Subject: [PATCH 008/736] Bump lets-plot to 2.2.1 and 3.1.1
It resolves
* https://github.com/JetBrains/lets-plot/issues/472
* https://github.com/JetBrains/lets-plot/issues/485
---
gradle.properties | 4 +--
.../threads/openmodel/gui/TargetRateChart.kt | 28 ++++++++-----------
src/dist/src/dist/expected_release_jars.csv | 18 ++++++------
src/licenses/build.gradle.kts | 18 ------------
src/licenses/licenses/lets-plot/LICENSE | 21 --------------
5 files changed, 23 insertions(+), 66 deletions(-)
delete mode 100644 src/licenses/licenses/lets-plot/LICENSE
diff --git a/gradle.properties b/gradle.properties
index bb5ff14426e..154d602a448 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -113,8 +113,8 @@ jsoup.version=1.14.1
jtidy.version=r938
junit4.version=4.13.2
junit5.version=5.8.1
-lets-plot-batik.version=2.2.0
-lets-plot-kotlin-jvm.version=3.1.0
+lets-plot-batik.version=2.2.1
+lets-plot-kotlin-jvm.version=3.1.1
log4j.version=2.17.0
mail.version=1.5.0-b01
miglayout.version=5.3
diff --git a/src/core/src/main/kotlin/org/apache/jmeter/threads/openmodel/gui/TargetRateChart.kt b/src/core/src/main/kotlin/org/apache/jmeter/threads/openmodel/gui/TargetRateChart.kt
index 306803612d8..facfb6182f0 100644
--- a/src/core/src/main/kotlin/org/apache/jmeter/threads/openmodel/gui/TargetRateChart.kt
+++ b/src/core/src/main/kotlin/org/apache/jmeter/threads/openmodel/gui/TargetRateChart.kt
@@ -24,7 +24,7 @@ import jetbrains.letsPlot.geom.geomLine
import jetbrains.letsPlot.intern.toSpec
import jetbrains.letsPlot.label.ggtitle
import jetbrains.letsPlot.letsPlot
-import jetbrains.letsPlot.scale.scaleXContinuous
+import jetbrains.letsPlot.scale.scaleXTime
import jetbrains.letsPlot.theme
import org.apache.jmeter.threads.openmodel.ThreadSchedule
import org.apache.jmeter.threads.openmodel.ThreadScheduleStep
@@ -51,10 +51,15 @@ public class TargetRateChart : JPanel() {
layout = BorderLayout()
}
+ private var prevSteps: List? = null
private var prevTimes: DoubleArray? = null
private var prevRate: DoubleArray? = null
public fun updateSchedule(threadSchedule: ThreadSchedule) {
+ if (threadSchedule.steps == prevSteps) {
+ return
+ }
+ prevSteps = threadSchedule.steps
val timeValues = mutableListOf()
val rateValues = mutableListOf()
var time = 0.0
@@ -92,18 +97,9 @@ public class TargetRateChart : JPanel() {
}
prevTimes = time.copyOf()
prevRate = rate.copyOf()
- val totalDuration = time.last()
- val timeUnit = when {
- totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.DAYS.asSeconds -> TimeUnit.DAYS
- totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.HOURS.asSeconds -> TimeUnit.HOURS
- totalDuration > MIN_TICKS_FOR_TIME_AXIS * TimeUnit.MINUTES.asSeconds -> TimeUnit.MINUTES
- else -> TimeUnit.SECONDS
- }
- if (timeUnit != TimeUnit.SECONDS) {
- val scale = 1.0 / timeUnit.asSeconds
- for (i in time.indices) {
- time[i] *= scale
- }
+ val timeScale = TimeUnit.SECONDS.toMillis(1).toDouble()
+ for (i in time.indices) {
+ time[i] *= timeScale
}
val maxRate = rate.maxOrNull() ?: 0.0
val rateUnit = rateUnitFor(maxRate)
@@ -120,16 +116,16 @@ public class TargetRateChart : JPanel() {
}
}
removeAll()
- add(createChart(time = time, rate = rate, timeUnit = timeUnit, rateUnit = rateUnit), BorderLayout.CENTER)
+ add(createChart(time = time, rate = rate, rateUnit = rateUnit), BorderLayout.CENTER)
}
- private fun createChart(time: DoubleArray, rate: DoubleArray, timeUnit: TimeUnit, rateUnit: TimeUnit): JComponent {
+ private fun createChart(time: DoubleArray, rate: DoubleArray, rateUnit: TimeUnit): JComponent {
val data = mapOf(
"time" to time,
"rate" to rate
)
val plot = letsPlot(data) + geomLine { x = "time"; y = "rate" } +
- scaleXContinuous("Time, " + timeUnit.name.lowercase(), expand = listOf(0, 0)) +
+ scaleXTime("Time since test start", expand = listOf(0, 0)) +
ggtitle("Target load rate per " + rateUnit.name.lowercase().removeSuffix("s")) +
theme(axisTitleY = "blank")
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index 8ef431f9fe3..27a5d84f98a 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -2,7 +2,7 @@
29371,annotations-23.0.0.jar
2387,apiguardian-api-1.1.0.jar
122004,asm-9.2.jar
-517353,base-portable-jvm-2.2.0.jar
+518460,base-portable-jvm-2.2.1.jar
485809,batik-anim-1.14.jar
424624,batik-awt-util-1.14.jar
703757,batik-bridge-1.14.jar
@@ -92,8 +92,8 @@
22357,kotlin-stdlib-jdk7-1.6.0.jar
16201,kotlin-stdlib-jdk8-1.6.0.jar
792176,kotlinx-html-jvm-0.7.3.jar
-191102,lets-plot-batik-2.2.0.jar
-3995999,lets-plot-common-2.2.0.jar
+181223,lets-plot-batik-2.2.1.jar
+4025480,lets-plot-common-2.2.1.jar
208235,log4j-1.2-api-2.17.0.jar
301776,log4j-api-2.17.0.jar
1789339,log4j-core-2.17.0.jar
@@ -107,11 +107,11 @@
65261,oro-2.0.8.jar
1307434,ph-commons-10.1.2.jar
506616,ph-css-6.3.4.jar
-640740,plot-api-jvm-3.1.0.jar
-882161,plot-base-portable-jvm-2.2.0.jar
-847234,plot-builder-portable-jvm-2.2.0.jar
-115295,plot-common-portable-jvm-2.2.0.jar
-744679,plot-config-portable-jvm-2.2.0.jar
+642167,plot-api-jvm-3.1.1.jar
+891618,plot-base-portable-jvm-2.2.1.jar
+845777,plot-builder-portable-jvm-2.2.1.jar
+116030,plot-common-portable-jvm-2.2.1.jar
+749095,plot-config-portable-jvm-2.2.1.jar
11369,reactive-streams-1.0.3.jar
1315838,rhino-1.7.13.jar
1242230,rsyntaxtextarea-3.1.3.jar
@@ -123,7 +123,7 @@
2539,swing-extensions-visual-padding-0.1.3.jar
734528,tika-core-1.27.jar
1397879,tika-parsers-1.27.jar
-173926,vis-svg-portable-jvm-2.2.0.jar
+174661,vis-svg-portable-jvm-2.2.1.jar
3154938,xalan-2.7.2.jar
1386502,xercesImpl-2.12.1.jar
220536,xml-apis-1.4.01.jar
diff --git a/src/licenses/build.gradle.kts b/src/licenses/build.gradle.kts
index 67115faa3fe..05d5a27a889 100644
--- a/src/licenses/build.gradle.kts
+++ b/src/licenses/build.gradle.kts
@@ -135,24 +135,6 @@ val gatherBinaryLicenses by tasks.registering(GatherLicenseTask::class) {
expectedLicense = SpdxLicense.MIT
}
- for (
- a in listOf(
- "lets-plot-kotlin-jvm",
- "lets-plot-common",
- "plot-config-portable-jvm",
- "plot-builder-portable-jvm",
- "plot-base-portable-jvm",
- "plot-common-portable-jvm",
- "vis-svg-portable-jvm",
- "base-portable-jvm"
- )
- ) {
- overrideLicense("org.jetbrains.lets-plot:$a") {
- expectedLicense = SpdxLicense.MIT
- licenseFiles = "lets-plot"
- }
- }
-
overrideLicense("com.sun.mail:all:1.5.0-b01") {
// Multiple licenses, specify explicitly
expectedLicense = SimpleLicense("CDDL", uri("http://www.sun.com/cddl")) and SimpleLicense("GPLv2+CE", uri("https://glassfish.java.net/public/CDDL+GPL_1_1.html"))
diff --git a/src/licenses/licenses/lets-plot/LICENSE b/src/licenses/licenses/lets-plot/LICENSE
deleted file mode 100644
index 1bcc8b5941d..00000000000
--- a/src/licenses/licenses/lets-plot/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2019 JetBrains
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
From 1977e4c2dd0c49d037ade10e0946c36970da25eb Mon Sep 17 00:00:00 2001
From: Milamber
Date: Thu, 23 Dec 2021 17:51:02 +0100
Subject: [PATCH 009/736] Update changes_history.xml for 5.4.2 and 5.4.3
---
xdocs/changes_history.xml | 272 ++++++++++++++++++++++++++++++--------
1 file changed, 218 insertions(+), 54 deletions(-)
diff --git a/xdocs/changes_history.xml b/xdocs/changes_history.xml
index b0e24c9055d..8b8b4f40006 100644
--- a/xdocs/changes_history.xml
+++ b/xdocs/changes_history.xml
@@ -41,73 +41,257 @@ Current changes are detailed in Changes.
Changes sections are chronologically ordered from top (most recent) to bottom
(least recent)
-
+
-
Version 5.4.1
+
Version 5.4.3
Summary
+
This version is a fix release against the vulnerability CVE-2021-45105: Apache Log4j2 versions 2.0-alpha1 through 2.16.0 (excluding 2.12.3) did not protect from uncontrolled recursion from self-referential lookups. This allows an attacker with control over Thread Context Map data to cause a denial of service when a crafted string is interpreted.
+
Restart after LAF change has been reinstated, it had been removed in JMeter 5.3
+
Updated Apache log4j2 to 2.17.0 (from 2.16.0).
-
-Improvements
+
-
HTTP Samplers and Test Script Recorder
+Known problems and workarounds
-
+
The Once Only controller behaves correctly under a Thread Group or Loop Controller,
+but otherwise its behaviour is not consistent (or clearly specified).
-
Other samplers
-
-
+
+The numbers that appear to the left of the green box are the number of active threads / total number of threads,
+the total number of threads only applies to a locally run test, otherwise it will show 0 (see 55510).
+
+
+
+Note that under some windows systems you may have this WARNING:
+
+The fix is to run JMeter as Administrator, it will create the registry key for you, then you can restart JMeter as a normal user and you won't have the warning anymore.
+
+
+
+You may encounter the following error:
+
+ if you run a HTTPS request on a web site with a SSL certificate (itself or one of SSL certificates in its chain of trust) with a signature
+ algorithm using MD2 (like md2WithRSAEncryption) or with a SSL certificate with a size lower than 1024 bits.
+This error is related to increased security in Java 8+.
+
+To allow you to perform your HTTPS request, you can downgrade the security of your Java installation by editing
+the Java jdk.certpath.disabledAlgorithms property. Remove the MD2 value or the constraint on size, depending on your case.
+
+This property is in this file:
+
+See 56357 for details.
+
+
+
+Under Mac OSX Aggregate Graph will show wrong values due to mirroring effect on numbers.
+This is due to a known Java bug, see Bug JDK-8065373
+The fix is to use JDK8_u45 or later.
+
+
+
+View Results Tree may fail to display some HTML code under HTML renderer, see 54586.
+This is due to a known Java bug which fails to parse "px" units in row/col attributes.
+See Bug JDK-8031109
+The fix is to use JDK9 b65 or later.
+
+
+
+JTable selection with keyboard (SHIFTup/down) is totally unusable with Java 7 on Mac OSX.
+This is due to a known Java bug JDK-8025126
+The fix is to use JDK 8 b132 or later.
+
+
+
+Since Java 11 the JavaScript implementation Nashorn has been deprecated.
+Java will emit the following deprecation warnings, if you are using JavaScript based on Nashorn.
+
+To silence these warnings, add -Dnashorn.args=--no-deprecation-warning to your Java arguments.
+That can be achieved by setting the enviroment variable JVM_ARGS
+
+
+
+
+With Java 15 the JavaScript implementation Nashorn has been removed. To add back a JSR-223 compatible JavaScript engine you have two options:
+
+ The OpenJDK Nashorn implementation comes as a module. To use it, you will have to download it and add it to the module path. A hacky way to download the version 15.0 and its dependencies and set the module path is outlined below:
+
+
+
+
-
Controllers
-
-
Listeners
+
+
+
Version 5.4.2
+
+Summary
+
+
This version is a fix release against the vulnerability CVE-2021-44228: Apache Log4j2 JNDI features do not protect against attacker controlled LDAP and other JNDI related endpoints.
+
The Once Only controller behaves correctly under a Thread Group or Loop Controller,
+but otherwise its behaviour is not consistent (or clearly specified).
+
+
+The numbers that appear to the left of the green box are the number of active threads / total number of threads,
+the total number of threads only applies to a locally run test, otherwise it will show 0 (see 55510).
+
+
+
+Note that under some windows systems you may have this WARNING:
+
+The fix is to run JMeter as Administrator, it will create the registry key for you, then you can restart JMeter as a normal user and you won't have the warning anymore.
+
+
+
+You may encounter the following error:
+
+ if you run a HTTPS request on a web site with a SSL certificate (itself or one of SSL certificates in its chain of trust) with a signature
+ algorithm using MD2 (like md2WithRSAEncryption) or with a SSL certificate with a size lower than 1024 bits.
+This error is related to increased security in Java 8+.
+
+To allow you to perform your HTTPS request, you can downgrade the security of your Java installation by editing
+the Java jdk.certpath.disabledAlgorithms property. Remove the MD2 value or the constraint on size, depending on your case.
+
+This property is in this file:
+
+See 56357 for details.
+
+
+
+Under Mac OSX Aggregate Graph will show wrong values due to mirroring effect on numbers.
+This is due to a known Java bug, see Bug JDK-8065373
+The fix is to use JDK8_u45 or later.
+
+
+
+View Results Tree may fail to display some HTML code under HTML renderer, see 54586.
+This is due to a known Java bug which fails to parse "px" units in row/col attributes.
+See Bug JDK-8031109
+The fix is to use JDK9 b65 or later.
+
+
+
+JTable selection with keyboard (SHIFTup/down) is totally unusable with Java 7 on Mac OSX.
+This is due to a known Java bug JDK-8025126
+The fix is to use JDK 8 b132 or later.
+
+
+
+Since Java 11 the JavaScript implementation Nashorn has been deprecated.
+Java will emit the following deprecation warnings, if you are using JavaScript based on Nashorn.
+
+To silence these warnings, add -Dnashorn.args=--no-deprecation-warning to your Java arguments.
+That can be achieved by setting the enviroment variable JVM_ARGS
+
+
+
+
+With Java 15 the JavaScript implementation Nashorn has been removed. To add back a JSR-223 compatible JavaScript engine you have two options:
+
+ The OpenJDK Nashorn implementation comes as a module. To use it, you will have to download it and add it to the module path. A hacky way to download the version 15.0 and its dependencies and set the module path is outlined below:
+
+
Open Model Thread Group: load generator with programmable profile
-
-
-UX improvements
+
Kotlin language is now used in some core classes and tests (e.g. Open Model Thread Group).
+ JMeter is compiled with apiTarget=1.5, and it ships with kotlin-stdlib 1.6.
+
+
+
lets-plot-kotlin charting library is added,
+ so it will be easier to refine and create new charts in UI in the future.
+
@@ -118,14 +133,6 @@ Summary
not their string representations.
-
Functions
-
-
-
-
I18N
-
-
-
Report / Dashboard
65353Make the estimator used for calculating percentiles on the dashboard configurable
From 879a2b935c0c8e7e087d96f141c28e915504c537 Mon Sep 17 00:00:00 2001
From: Woonsan Ko
Date: Mon, 27 Dec 2021 21:54:31 +0300
Subject: [PATCH 011/736] 65108: Support JMeter variables in GraphQL HTTP
Request
Previously the variables were parsed as JSON, and now the variable
contents is added as a raw part (no parsing) of the JSON.
fixes #660
---
.../http/config/GraphQLRequestParams.java | 9 +++
.../http/util/GraphQLRequestParamUtils.java | 64 ++++++++-----------
.../util/TestGraphQLRequestParamUtils.java | 53 +++++++++------
xdocs/changes.xml | 1 +
4 files changed, 68 insertions(+), 59 deletions(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/config/GraphQLRequestParams.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/config/GraphQLRequestParams.java
index 6edabbf4c8c..ded3b8d8594 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/config/GraphQLRequestParams.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/config/GraphQLRequestParams.java
@@ -64,4 +64,13 @@ public String getVariables() {
public void setVariables(String variables) {
this.variables = variables;
}
+
+ @Override
+ public String toString() {
+ return "GraphQLRequestParams{" +
+ "operationName='" + operationName + '\'' +
+ ", query='" + query + '\'' +
+ ", variables='" + variables + '\'' +
+ '}';
+ }
}
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/util/GraphQLRequestParamUtils.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/util/GraphQLRequestParamUtils.java
index 0d3f7422079..00673bf4ab5 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/util/GraphQLRequestParamUtils.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/util/GraphQLRequestParamUtils.java
@@ -20,6 +20,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.regex.Pattern;
@@ -31,13 +32,12 @@
import org.apache.jmeter.config.Arguments;
import org.apache.jmeter.protocol.http.config.GraphQLRequestParams;
import org.apache.jmeter.testelement.property.JMeterProperty;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.JsonNodeType;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -46,16 +46,16 @@
*/
public final class GraphQLRequestParamUtils {
- private static final String VARIABLES_FIELD = "variables";
+ public static final String VARIABLES_FIELD = "variables";
- private static final String OPERATION_NAME_FIELD = "operationName";
+ public static final String OPERATION_NAME_FIELD = "operationName";
- private static final String QUERY_FIELD = "query";
-
- private static Logger log = LoggerFactory.getLogger(GraphQLRequestParamUtils.class);
+ public static final String QUERY_FIELD = "query";
private static final Pattern WHITESPACES_PATTERN = Pattern.compile("\\p{Space}+");
+ private static final JsonFactory jsonFactory = new JsonFactory();
+
private GraphQLRequestParamUtils() {
}
@@ -79,28 +79,26 @@ public static boolean isGraphQLContentType(final String contentType) {
* @throws RuntimeException if JSON serialization fails for some reason due to any runtime environment issues
*/
public static String toPostBodyString(final GraphQLRequestParams params) {
- final ObjectMapper mapper = new ObjectMapper();
- final ObjectNode postBodyJson = mapper.createObjectNode();
- postBodyJson.set(OPERATION_NAME_FIELD,
- JsonNodeFactory.instance.textNode(StringUtils.trimToNull(params.getOperationName())));
-
- if (StringUtils.isNotBlank(params.getVariables())) {
- try {
- final ObjectNode variablesJson = mapper.readValue(params.getVariables(), ObjectNode.class);
- postBodyJson.set(VARIABLES_FIELD, variablesJson);
- } catch (JsonProcessingException e) {
- log.error("Ignoring the GraphQL query variables content due to the syntax error: {}",
- e.getLocalizedMessage());
+ final StringWriter writer = new StringWriter();
+
+ try (JsonGenerator gen = jsonFactory.createGenerator(writer)) {
+ gen.writeStartObject();
+
+ gen.writeStringField(OPERATION_NAME_FIELD, StringUtils.trimToNull(params.getOperationName()));
+
+ if (StringUtils.isNotBlank(params.getVariables())) {
+ gen.writeFieldName(VARIABLES_FIELD);
+ gen.writeRawValue(StringUtils.trim(params.getVariables()));
}
- }
- postBodyJson.set(QUERY_FIELD, JsonNodeFactory.instance.textNode(StringUtils.trim(params.getQuery())));
+ gen.writeStringField(QUERY_FIELD, StringUtils.trim(params.getQuery()));
- try {
- return mapper.writeValueAsString(postBodyJson);
- } catch (JsonProcessingException e) {
- throw new RuntimeException("Cannot serialize JSON for POST body string", e);
+ gen.writeEndObject();
+ } catch (IOException e) {
+ throw new IllegalStateException("Error while writing graphql post body " + params, e);
}
+
+ return writer.toString();
}
/**
@@ -118,17 +116,7 @@ public static String queryToGetParamValue(final String query) {
* @return an HTTP GET request parameter value converted from the GraphQL Variables JSON input string
*/
public static String variablesToGetParamValue(final String variables) {
- final ObjectMapper mapper = new ObjectMapper();
-
- try {
- final ObjectNode variablesJson = mapper.readValue(variables, ObjectNode.class);
- return mapper.writeValueAsString(variablesJson);
- } catch (JsonProcessingException e) {
- log.error("Ignoring the GraphQL query variables content due to the syntax error: {}",
- e.getLocalizedMessage());
- }
-
- return null;
+ return StringUtils.trimToNull(variables);
}
/**
@@ -151,7 +139,7 @@ public static GraphQLRequestParams toGraphQLRequestParams(byte[] postData, final
try (InputStreamReader reader = new InputStreamReader(new ByteArrayInputStream(postData), encoding)) {
data = mapper.readValue(reader, ObjectNode.class);
} catch (IOException e) {
- throw new IllegalArgumentException("Invalid json data: " + e.getLocalizedMessage());
+ throw new IllegalArgumentException("Invalid json data: " + e.getLocalizedMessage(), e);
}
String operationName = null;
diff --git a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/util/TestGraphQLRequestParamUtils.java b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/util/TestGraphQLRequestParamUtils.java
index 4b4d0ea782b..be7b075eed1 100644
--- a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/util/TestGraphQLRequestParamUtils.java
+++ b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/util/TestGraphQLRequestParamUtils.java
@@ -22,8 +22,8 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.params.provider.Arguments.arguments;
-import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.stream.Stream;
@@ -36,7 +36,8 @@
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
-import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
class TestGraphQLRequestParamUtils {
@@ -72,6 +73,8 @@ class TestGraphQLRequestParamUtils {
+ "\"query\":\"" + StringUtils.replace(QUERY.trim(), "\n", "\\n") + "\""
+ "}";
+ private static final ObjectMapper objectMapper = new ObjectMapper();
+
private GraphQLRequestParams params;
@BeforeEach
@@ -81,7 +84,7 @@ void setUp() {
@ParameterizedTest
@ValueSource(strings = { "application/json", "application/json;charset=utf-8", "application/json; charset=utf-8" })
- void testIsGraphQLContentType(String contentType) throws Exception {
+ void testIsGraphQLContentType(String contentType) {
assertTrue(GraphQLRequestParamUtils.isGraphQLContentType(contentType));
}
@@ -97,20 +100,32 @@ void testInvalidGraphQLContentType(String contentType) {
assertFalse(GraphQLRequestParamUtils.isGraphQLContentType(contentType));
}
- @Test
- void testToPostBodyString() throws Exception {
- assertEquals(EXPECTED_POST_BODY, GraphQLRequestParamUtils.toPostBodyString(params));
+ static Stream postBodyFieldNameAndJsonNodes() throws Exception {
+ final JsonNode expectedPostBodyJson = objectMapper.readTree(EXPECTED_POST_BODY);
+ final JsonNode actualPostBodyJson = objectMapper.readTree(
+ GraphQLRequestParamUtils.toPostBodyString(new GraphQLRequestParams(OPERATION_NAME, QUERY, VARIABLES)));
+ return Stream.of(
+ arguments(GraphQLRequestParamUtils.OPERATION_NAME_FIELD, expectedPostBodyJson, actualPostBodyJson),
+ arguments(GraphQLRequestParamUtils.VARIABLES_FIELD, expectedPostBodyJson, actualPostBodyJson),
+ arguments(GraphQLRequestParamUtils.QUERY_FIELD, expectedPostBodyJson, actualPostBodyJson));
+ }
+
+ @ParameterizedTest
+ @MethodSource("postBodyFieldNameAndJsonNodes")
+ void testFieldInJsonFromToPostBodyString(String fieldName, JsonNode expectedNode, JsonNode actualNode) {
+ assertEquals(expectedNode.get(fieldName), actualNode.get(fieldName),
+ "The value of the '" + fieldName + "' field doesn't match in " + actualNode);
}
@Test
- void testQueryToGetParamValue() throws Exception {
+ void testQueryToGetParamValue() {
assertEquals(EXPECTED_QUERY_GET_PARAM_VALUE, GraphQLRequestParamUtils.queryToGetParamValue(params.getQuery()));
}
@Test
void testVariablesToGetParamValue() throws Exception {
- assertEquals(EXPECTED_VARIABLES_GET_PARAM_VALUE,
- GraphQLRequestParamUtils.variablesToGetParamValue(params.getVariables()));
+ assertEquals(objectMapper.readTree(EXPECTED_VARIABLES_GET_PARAM_VALUE),
+ objectMapper.readTree(GraphQLRequestParamUtils.variablesToGetParamValue(params.getVariables())));
}
@Test
@@ -132,24 +147,20 @@ void testToGraphQLRequestParamsWithPostData() throws Exception {
@ParameterizedTest
@ValueSource(strings = { "", "{}"})
- void testInvalidJsonData(String postDataAsString) throws JsonProcessingException, UnsupportedEncodingException {
+ void testInvalidJsonData(String postDataAsString) {
byte[] postData = postDataAsString.getBytes(StandardCharsets.UTF_8);
assertThrows(IllegalArgumentException.class,
- () -> {
- GraphQLRequestParamUtils.toGraphQLRequestParams(postData, null);
- });
+ () -> GraphQLRequestParamUtils.toGraphQLRequestParams(postData, null));
}
@ParameterizedTest
@ValueSource(strings = { "{\"query\":\"select * from emp\"}",
"{\"operationName\":{\"id\":123},\"query\":\"query { droid { id }}\"}",
"{\"variables\":\"r2d2\",\"query\":\"query { droid { id }}\"}" })
- void testInvalidGraphQueryParam(String postDataAsString)
- throws JsonProcessingException, UnsupportedEncodingException {
+ void testInvalidGraphQueryParam(String postDataAsString) {
byte[] postData = postDataAsString.getBytes(StandardCharsets.UTF_8);
- assertThrows(IllegalArgumentException.class, () -> {
- GraphQLRequestParamUtils.toGraphQLRequestParams(postData, null);
- });
+ assertThrows(IllegalArgumentException.class,
+ () -> GraphQLRequestParamUtils.toGraphQLRequestParams(postData, null));
}
@Test
@@ -186,14 +197,14 @@ void testToGraphQLRequestParamsWithHttpArguments() throws Exception {
}
@Test
- void testMissingParams() throws UnsupportedEncodingException {
+ void testMissingParams() {
Arguments args = new Arguments();
assertThrows(IllegalArgumentException.class,
() -> GraphQLRequestParamUtils.toGraphQLRequestParams(args, null));
}
@Test
- void testInvalidQueryParam() throws UnsupportedEncodingException {
+ void testInvalidQueryParam() {
Arguments args = new Arguments();
args.addArgument(new HTTPArgument("query", "select * from emp", "=", false));
assertThrows(IllegalArgumentException.class,
@@ -201,7 +212,7 @@ void testInvalidQueryParam() throws UnsupportedEncodingException {
}
@Test
- void testInvalidQueryParamVariables() throws UnsupportedEncodingException {
+ void testInvalidQueryParamVariables() {
Arguments args = new Arguments();
args.addArgument(new HTTPArgument("query", "query { droid { id }}", "=", false));
args.addArgument(new HTTPArgument("variables", "r2d2", "=", false));
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 22bd0e92559..de4a9ca6b4a 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -206,6 +206,7 @@ however, the profile can't be updated while the test is running.
header in HC4 sampler.
65363NullPointerException in HTTPHC4Impl$ManagedCredentialsProvider.getAuthorizationForAuthScope when 401 response from remote and httpclient4.auth.preemptive=false
65692HTTP(s) Test Script Recorder: Enable setting enabled cipher suite and enabled protocols on SSLContext/ Align ssl properties between Java and HC4 impl
From 3786a5e61340a6eccb3594db03d919e5c94f7af8 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Tue, 28 Dec 2021 12:42:12 +0300
Subject: [PATCH 012/736] Simplify :src:dist:clean configuration, ensure
/lib/junit/test.jar is removed on clean
In practice, clean should not be required, however, making it a bit more precise makes sense anyway.
See https://bz.apache.org/bugzilla/show_bug.cgi?id=63914
fixes #659
---
src/dist/build.gradle.kts | 15 +++++++--------
xdocs/changes.xml | 1 +
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
index d414fb3ac88..9fc84783deb 100644
--- a/src/dist/build.gradle.kts
+++ b/src/dist/build.gradle.kts
@@ -92,14 +92,13 @@ dependencies {
buildDocs("org.jdom:jdom")
}
-tasks.named(BasePlugin.CLEAN_TASK_NAME).configure {
- doLast {
- // createDist can't yet remove outdated jars (e.g. when dependency is updated to a newer version)
- // so we enhance "clean" task to kill the jars
- delete(fileTree("$rootDir/bin") { include("ApacheJMeter.jar") })
- delete(fileTree("$rootDir/lib") { include("*.jar") })
- delete(fileTree("$rootDir/lib/ext") { include("ApacheJMeter*.jar") })
- }
+tasks.clean {
+ // copyLibs uses Sync task, so it can't predict all the possible output files (e.g. from previous executions)
+ // So we register patterns to remove explicitly
+ delete(fileTree("$rootDir/bin") { include("ApacheJMeter.jar") })
+ delete(fileTree("$rootDir/lib") { include("*.jar") })
+ delete(fileTree("$rootDir/lib/ext") { include("ApacheJMeter*.jar") })
+ delete(fileTree("$rootDir/lib/junit") { include("test.jar") })
}
// Libs are populated dynamically since we can't get the full set of dependencies
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index de4a9ca6b4a..a3a9cfb2a7c 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -265,6 +265,7 @@ however, the profile can't be updated while the test is running.
65300IllegalAccessError when opening file dialog with Java 16
65336Blank labels when different elements had the same name
65522Restart doesn't work, when parameters contain spaces
+
63914Simplify :src:dist:clean configuration, ensure /lib/junit/test.jar is removed on clean
From 155485c72b74ca8bc225aa19706676f7e33f5272 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Magnus=20Sp=C3=A5ngdal?=
Date: Wed, 14 Apr 2021 19:05:42 +0200
Subject: [PATCH 013/736] Allow setters in ConstantThroughputTimer to updating
the values during the run time
fixes #662
---
.../timers/ConstantThroughputTimer.java | 35 +++++++++++--------
.../ConstantThroughputTimerBeanInfo.java | 8 ++---
xdocs/changes.xml | 2 ++
3 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimer.java b/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimer.java
index a4dafcfe946..7b745b9c0fe 100644
--- a/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimer.java
+++ b/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimer.java
@@ -30,6 +30,8 @@
import org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer;
import org.apache.jmeter.testelement.AbstractTestElement;
import org.apache.jmeter.testelement.TestStateListener;
+import org.apache.jmeter.testelement.property.DoubleProperty;
+import org.apache.jmeter.testelement.property.IntegerProperty;
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.StringProperty;
import org.apache.jmeter.threads.AbstractThreadGroup;
@@ -60,6 +62,12 @@ private static class ThroughputInfo{
private static final double MILLISEC_PER_MIN = 60000.0;
+ private static final Mode DEFAULT_CALC_MODE = Mode.ThisThreadOnly;
+
+ // TODO: most props use class simpleName as prefix but that would break backward compatiblity here
+ public static final String THROUGHPUT = "throughput";
+ public static final String CALC_MODE = "calcMode";
+
/**
* This enum defines the calculation modes used by the ConstantThroughputTimer.
*/
@@ -72,6 +80,8 @@ public enum Mode {
;
private final String propertyName; // The property name to be used to look up the display string
+ // Enum#values() clones the array, and we don't want to pay that cost as we know we don't modify the array
+ private static final Mode[] CACHED_VALUES = values();
Mode(String name) {
this.propertyName = name;
@@ -89,13 +99,6 @@ public String toString() {
*/
private long previousTime = 0;
- private Mode mode = Mode.ThisThreadOnly;
-
- /**
- * Desired throughput, in samples per minute.
- */
- private double throughput;
-
//For calculating throughput across all threads
private static final ThroughputInfo allThreadsInfo = new ThroughputInfo();
@@ -117,7 +120,7 @@ public ConstantThroughputTimer() {
* Desired sampling rate, in samples per minute.
*/
public void setThroughput(double throughput) {
- this.throughput = throughput;
+ setProperty(new DoubleProperty(THROUGHPUT, throughput));
}
/**
@@ -126,15 +129,16 @@ public void setThroughput(double throughput) {
* @return the rate at which samples should occur, in samples per minute.
*/
public double getThroughput() {
- return throughput;
+ return getPropertyAsDouble(THROUGHPUT);
}
public int getCalcMode() {
- return mode.ordinal();
+ return getPropertyAsInt(CALC_MODE, DEFAULT_CALC_MODE.ordinal());
}
public void setCalcMode(int mode) {
- this.mode = Mode.values()[mode];
+ Mode resolved = Mode.CACHED_VALUES[mode];
+ setProperty(new IntegerProperty(CALC_MODE, resolved.ordinal()));
}
/**
@@ -178,7 +182,7 @@ private long calculateDelay() {
long delay;
// N.B. we fetch the throughput each time, as it may vary during a test
double msPerRequest = MILLISEC_PER_MIN / getThroughput();
- switch (mode) {
+ switch (getMode()) {
case AllActiveThreads: // Total number of threads
delay = Math.round(JMeterContextService.getNumberOfThreads() * msPerRequest);
break;
@@ -279,7 +283,7 @@ public void setProperty(JMeterProperty property) {
try {
final BeanInfo beanInfo = Introspector.getBeanInfo(this.getClass());
final ResourceBundle rb = (ResourceBundle) beanInfo.getBeanDescriptor().getValue(GenericTestBeanCustomizer.RESOURCE_BUNDLE);
- for(Enum e : Mode.values()) {
+ for(Enum e : Mode.CACHED_VALUES) {
final String propName = e.toString();
if (objectValue.equals(rb.getObject(propName))) {
final int tmpMode = e.ordinal();
@@ -324,11 +328,12 @@ public void testEnded(String host) {
// For access from test code
Mode getMode() {
- return mode;
+ int mode = getCalcMode();
+ return Mode.CACHED_VALUES[mode];
}
// For access from test code
void setMode(Mode newMode) {
- mode = newMode;
+ setCalcMode(newMode.ordinal());
}
}
diff --git a/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java b/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java
index 0d28dffb438..63db360d1f2 100644
--- a/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java
+++ b/src/components/src/main/java/org/apache/jmeter/timers/ConstantThroughputTimerBeanInfo.java
@@ -30,14 +30,14 @@ public ConstantThroughputTimerBeanInfo() {
super(ConstantThroughputTimer.class);
createPropertyGroup("delay", //$NON-NLS-1$
- new String[] { "throughput", //$NON-NLS-1$
- "calcMode" }); //$NON-NLS-1$
+ new String[] { ConstantThroughputTimer.THROUGHPUT, //$NON-NLS-1$
+ ConstantThroughputTimer.CALC_MODE }); //$NON-NLS-1$
- PropertyDescriptor p = property("throughput"); //$NON-NLS-1$
+ PropertyDescriptor p = property(ConstantThroughputTimer.THROUGHPUT); //$NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, 0.0);
- p = property("calcMode", ConstantThroughputTimer.Mode.class); //$NON-NLS-1$
+ p = property(ConstantThroughputTimer.CALC_MODE, ConstantThroughputTimer.Mode.class); //$NON-NLS-1$
p.setValue(DEFAULT, ConstantThroughputTimer.Mode.ThisThreadOnly.ordinal());
p.setValue(NOT_UNDEFINED, Boolean.TRUE); // must be defined
}
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index a3a9cfb2a7c..d29ffc259a1 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -232,6 +232,7 @@ however, the profile can't be updated while the test is running.
65269JSON Extractor and JSON JMESPath Extractor ignore sub-samples
65352Warning logged when Boundary Extractor doesn't find any match
65681Use default values for null values when extracting with JSONPostProcessor
+
Allow setters in ConstantThroughputTimer to updating the values during the run time
Functions
@@ -286,6 +287,7 @@ however, the profile can't be updated while the test is running.
Rithvik Patibandla (rithvikp98 at gmail.com)
Mariusz (mawasak at gmail.com)
peter.wong@csexperts.com
+
Magnus Spångdal (magnus.spangdal as avanza.se)
We also thank bug reporters who helped us improve JMeter.
From eb851f3f1f1ba0d86fe90ab8fb0e1ef5ffc6940a Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Tue, 28 Dec 2021 13:18:10 +0300
Subject: [PATCH 014/736] Update "thanks" section for 5.5
---
xdocs/changes.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index d29ffc259a1..e48dfb09190 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -287,6 +287,8 @@ however, the profile can't be updated while the test is running.
Rithvik Patibandla (rithvikp98 at gmail.com)
Mariusz (mawasak at gmail.com)
peter.wong@csexperts.com
+
Woonsan Ko (woonsan.ko at bloomreach.com)
+
Chromico Rek (atech5122 at gmail.com)
Magnus Spångdal (magnus.spangdal as avanza.se)
We also thank bug reporters who helped us improve JMeter.
@@ -175,7 +175,7 @@ however, the profile can't be updated while the test is running.
Updated json-path to 2.6.0 (from 2.4.0).
Updated jsoup to 1.14.1 (from 1.13.1).
Updated JUnit to 4.13.2 and 5.8.1 (from 4.13.1 and 5.7.0).
-
Updated Apache log4j2 to 2.17.0 (from 2.13.3).
+
Updated Apache log4j2 to 2.17.1 (from 2.13.3).
Updated Miglayout to 5.3 (from 5.2).
Updated Neo4j Java driver to 4.3.3 (from 4.2.0).
Updated Objenesis to 3.2 (from 2.6).
@@ -290,6 +290,7 @@ however, the profile can't be updated while the test is running.
Woonsan Ko (woonsan.ko at bloomreach.com)
Chromico Rek (atech5122 at gmail.com)
Magnus Spångdal (magnus.spangdal as avanza.se)
+
Piotr Smietana (piotrsmietana1998 at gmail.com)
We also thank bug reporters who helped us improve JMeter.
From 1d8f1e1665ce3aefd091c1d37648674af599b572 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Mon, 3 Jan 2022 17:34:15 +0300
Subject: [PATCH 016/736] Gradle 7.5 compatibility: add checksum for
gradle-enterprise-gradle-plugin-3.8.jar
---
settings.gradle.kts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 4fd91363720..e27df11c67c 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -149,6 +149,8 @@ val expectedSha512 = mapOf(
to "gradle-enterprise-gradle-plugin-3.7.jar",
"7AC5F1C070A8C0A2BD096D96E896EB147966C39E0746120ABA5E107DDBDED441FF71F31F167475CD36EE082D8430D1FB98C51D29C6B91D147CC64DCE59C66D49"
to "gradle-enterprise-gradle-plugin-3.7.2.jar",
+ "24A1722CB574BA3126C3C6EBEB3D4A39D2A86ECCEDD378BA96A5508626D1AEAC7BB5FFBC189929E16900B94C1D016AFA83A462DCB2BB03F634FCA9C7FDE9EBA5"
+ to "gradle-enterprise-gradle-plugin-3.8.jar",
"FA305ACAAF45D005F5032D93C4F37CD097936C802943885A8F2B9EC27DA24F148DB41748655347C9A707C62614087432B3D32CC1B297381D45F3D8063BFFFA6D"
to "bcpg-jdk15on-1.62.jar",
"2BA6A5DEC9C8DAC2EB427A65815EB3A9ADAF4D42D476B136F37CD57E6D013BF4E9140394ABEEA81E42FBDB8FC59228C7B85C549ED294123BF898A7D048B3BD95"
From dc91e8bcf6bcb6ec6572672b12ec9fbb389c7159 Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Tue, 4 Jan 2022 09:20:25 +0000
Subject: [PATCH 017/736] Deleted the redundant log variable
---
.../protocol/http/gui/action/ParseCurlCommandAction.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
index 7e42bc03dd9..cc3c67433cb 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/gui/action/ParseCurlCommandAction.java
@@ -123,7 +123,6 @@ public class ParseCurlCommandAction extends AbstractAction implements MenuCreato
public static final String IMPORT_CURL = "import_curl";
private static final String CREATE_REQUEST = "CREATE_REQUEST";
private static final String CERT = "cert";
- private Logger log = LoggerFactory.getLogger(getClass());
/** A panel allowing results to be saved. */
private FilePanel filePanel = null;
static {
@@ -550,11 +549,11 @@ private void setFormData(Request request, HTTPSamplerProxy httpSampler) {
if (contentFile.canRead()) {
contentType = tika.detect(contentFile);
} else {
- log.info("Can not read file {}, so guessing contentType by extension.", formValue);
+ LOGGER.info("Can not read file {}, so guessing contentType by extension.", formValue);
contentType = tika.detect(formValue);
}
} catch (IOException e) {
- log.info(
+ LOGGER.info(
"Could not detect contentType for file {} by content, so falling back to detection by filename",
formValue);
contentType = tika.detect(formValue);
From 374cda59bb17af9f2ead0344132c1c32ef63d0da Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Tue, 4 Jan 2022 09:24:03 +0000
Subject: [PATCH 018/736] Remove unnecessary throws exception
---
.../apache/jmeter/engine/DistributedRunnerTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java b/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
index 0241287a3bc..6aa30b8faf8 100644
--- a/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
@@ -53,7 +53,7 @@ public static void createJmeterEnv() {
}
@Test
- public void testSuccess() throws Exception {
+ public void testSuccess() {
createJmeterEnv();
JMeterUtils.setProperty(DistributedRunner.RETRIES_NUMBER, "1");
JMeterUtils.setProperty(DistributedRunner.CONTINUE_ON_FAIL, "false");
@@ -69,7 +69,7 @@ public void testSuccess() throws Exception {
}
@Test
- public void testFailure1() throws Exception {
+ public void testFailure1() {
createJmeterEnv();
JMeterUtils.setProperty(DistributedRunner.RETRIES_NUMBER, "2");
JMeterUtils.setProperty(DistributedRunner.RETRIES_DELAY, "1");
@@ -101,7 +101,7 @@ private void initRunner(DistributedRunnerEmul runner, List hosts) {
}
@Test
- public void testFailure2() throws Exception {
+ public void testFailure2() {
createJmeterEnv();
JMeterUtils.setProperty(DistributedRunner.RETRIES_NUMBER, "1");
JMeterUtils.setProperty(DistributedRunner.RETRIES_DELAY, "1");
@@ -112,7 +112,7 @@ public void testFailure2() throws Exception {
}
@Test
- public void testFailure3() throws Exception {
+ public void testFailure3() {
createJmeterEnv();
JMeterUtils.setProperty(DistributedRunner.RETRIES_NUMBER, "1");
JMeterUtils.setProperty(DistributedRunner.RETRIES_DELAY, "1");
@@ -154,7 +154,7 @@ public void configure(HashTree testPlan) {
}
@Override
- public void runTest() throws JMeterEngineException {
+ public void runTest() {
log.debug("Running {}", host);
}
@@ -188,4 +188,4 @@ public void setHost(String host) {
this.host = host;
}
}
-}
+}
\ No newline at end of file
From 5c68bf81510bd2665a19f82ed7a929b9da93122f Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Tue, 4 Jan 2022 09:45:06 +0000
Subject: [PATCH 019/736] Kept the new line as suggested
---
.../java/org/apache/jmeter/engine/DistributedRunnerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java b/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
index 6aa30b8faf8..172b94d1691 100644
--- a/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/engine/DistributedRunnerTest.java
@@ -188,4 +188,4 @@ public void setHost(String host) {
this.host = host;
}
}
-}
\ No newline at end of file
+}
From 51507ea138dddcdb997b5d2c6626a894901ee468 Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Tue, 4 Jan 2022 14:51:41 +0000
Subject: [PATCH 020/736] Logger and string usage warning fix
Closes #689
---
.../java/org/apache/jmeter/functions/StringFromFile.java | 5 ++---
xdocs/changes.xml | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java b/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
index e1b221da7fa..fc2207feeeb 100644
--- a/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
+++ b/src/functions/src/main/java/org/apache/jmeter/functions/StringFromFile.java
@@ -122,7 +122,7 @@ public class StringFromFile extends AbstractFunction implements TestStateListene
public StringFromFile() {
if (log.isDebugEnabled()) {
- log.debug("++++++++ Construct {}" + this);
+ log.debug("++++++++ Construct {}", this);
}
}
@@ -147,9 +147,8 @@ private synchronized void openFile() {
String tn = Thread.currentThread().getName();
fileName = ((CompoundVariable) values[0]).execute();
- String start = "";
if (values.length >= PARAM_START) {
- start = ((CompoundVariable) values[PARAM_START - 1]).execute();
+ String start = ((CompoundVariable) values[PARAM_START - 1]).execute();
try {
// Low chances to be non numeric, we parse
myStart = Integer.parseInt(start);
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 33606f2ab5a..15ce9515889 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -194,6 +194,7 @@ however, the profile can't be updated while the test is running.
654Try do give better feedback while loading keystores
672Add more details to documentation for timeShift function. Contributed by Mariusz (mawasak at gmail.com)
Updated Gradle to 7.3 (from 7.2)
+
689Code clean up in StringFromFile. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
@@ -291,6 +292,7 @@ however, the profile can't be updated while the test is running.
Chromico Rek (atech5122 at gmail.com)
Magnus Spångdal (magnus.spangdal as avanza.se)
Piotr Smietana (piotrsmietana1998 at gmail.com)
+
Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
We also thank bug reporters who helped us improve JMeter.
From 00834652d0ee8857d2976616eb60f52062fd5694 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Tue, 4 Jan 2022 18:27:15 +0100
Subject: [PATCH 021/736] Use correct message format for MessageFormat in
HTMLAssertion
Regression introduced by code clean up in commit af3958b3cd5172bc60ca2d3f440febf173f45f8e
Bugzilla Id: 65782
---
.../main/java/org/apache/jmeter/assertions/HTMLAssertion.java | 2 +-
xdocs/changes.xml | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/assertions/HTMLAssertion.java b/src/components/src/main/java/org/apache/jmeter/assertions/HTMLAssertion.java
index 8fc41ea1cdd..6e93c7e82c8 100644
--- a/src/components/src/main/java/org/apache/jmeter/assertions/HTMLAssertion.java
+++ b/src/components/src/main/java/org/apache/jmeter/assertions/HTMLAssertion.java
@@ -124,7 +124,7 @@ private AssertionResult runTidy(SampleResult inResponse) {
log.debug("Errors/warnings detected while parsing with tidy: {}", errbuf);
result.setFailure(true);
result.setFailureMessage(MessageFormat.format(
- "Tidy Parser errors: {} (allowed {}) Tidy Parser warnings: {} (allowed {})",
+ "Tidy Parser errors: {0} (allowed {1}) Tidy Parser warnings: {2} (allowed {3})",
tidy.getParseErrors(), getErrorThreshold(), tidy.getParseWarnings(), getWarningThreshold()));
// return with an error
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 15ce9515889..c6cbeb9a215 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -234,6 +234,7 @@ however, the profile can't be updated while the test is running.
65352Warning logged when Boundary Extractor doesn't find any match
65681Use default values for null values when extracting with JSONPostProcessor
Allow setters in ConstantThroughputTimer to updating the values during the run time
+
65782Use correct message format for MessageFormat in HTMLAssertion
Functions
From a16df4bcc86453b122a5ff9ad5e640d036ad0673 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Tue, 4 Jan 2022 20:03:26 +0100
Subject: [PATCH 022/736] Convert links to mail archives to the new
lists.apache.org counterparts
---
xdocs/mail2.xml | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/xdocs/mail2.xml b/xdocs/mail2.xml
index 5311853b86f..520e6d4f08a 100644
--- a/xdocs/mail2.xml
+++ b/xdocs/mail2.xml
@@ -62,7 +62,7 @@ For old postings, please see the Jakarta JMeter User list, below.
From af7fc4d56bffab352843cc87514ab9ed19bdad32 Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Thu, 6 Jan 2022 14:49:05 +0000
Subject: [PATCH 024/736] Split function test refactor with failure and
different success scenarios separately
Closes #690
---
.../jmeter/functions/SplitFunctionTest.java | 56 +++++++++++++------
xdocs/changes.xml | 1 +
2 files changed, 40 insertions(+), 17 deletions(-)
diff --git a/src/functions/src/test/java/org/apache/jmeter/functions/SplitFunctionTest.java b/src/functions/src/test/java/org/apache/jmeter/functions/SplitFunctionTest.java
index 177b85ef7df..69169bb8d8a 100644
--- a/src/functions/src/test/java/org/apache/jmeter/functions/SplitFunctionTest.java
+++ b/src/functions/src/test/java/org/apache/jmeter/functions/SplitFunctionTest.java
@@ -17,15 +17,16 @@
package org.apache.jmeter.functions;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
import java.util.Collection;
import java.util.LinkedList;
import org.apache.jmeter.engine.util.CompoundVariable;
import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.threads.JMeterContext;
import org.apache.jmeter.threads.JMeterContextService;
import org.apache.jmeter.threads.JMeterVariables;
@@ -34,27 +35,30 @@
public class SplitFunctionTest extends JMeterTestCase {
- private JMeterContext jmctx = null;
private JMeterVariables vars = null;
@BeforeEach
public void setUp() {
- jmctx = JMeterContextService.getContext();
- jmctx.setVariables(new JMeterVariables());
- vars = jmctx.getVariables();
+ JMeterContext jmeterContext = JMeterContextService.getContext();
+ jmeterContext.setVariables(new JMeterVariables());
+ vars = jmeterContext.getVariables();
}
@Test
- public void splitTest1() throws Exception {
- String src = "";
-
- try {
- splitParams("a,b,c", null, null);
- fail("Expected InvalidVariableException (wrong number of parameters)");
- } catch (InvalidVariableException e) {
- // OK
- }
- src = "a,b,c";
+ public void shouldThrowExceptionWhenParameterCountIsInvalid() {
+ InvalidVariableException invalidVariableException = assertThrows(InvalidVariableException.class, () ->
+ splitParams("a,b,c", null, null),
+ ""
+ );
+ assertEquals(
+ "__split called with wrong number of parameters. Actual: 1. Expected: >= 2 and <= 3",
+ invalidVariableException.getMessage()
+ );
+ }
+
+ @Test
+ public void shouldSplitWithoutAnyArguments() throws Exception {
+ String src = "a,b,c";
SplitFunction split;
split = splitParams(src, "VAR1", null);
assertEquals(src, split.execute());
@@ -134,6 +138,24 @@ public void splitTest1() throws Exception {
assertNull(vars.get("VAR5_5"));
}
+ @Test
+ public void shouldSplitWithPreviousResultOnly() throws Exception {
+ String src = "a,,c,";
+ vars.put("VAR", src);
+ SplitFunction split = splitParams("${VAR}", "VAR5", null);
+
+ SampleResult previousResult = new SampleResult();
+ previousResult.setResponseData("Some data", null);
+
+ assertEquals(src, split.execute(previousResult, null));
+ assertEquals("4", vars.get("VAR5_n"));
+ assertEquals("a", vars.get("VAR5_1"));
+ assertEquals("?", vars.get("VAR5_2"));
+ assertEquals("c", vars.get("VAR5_3"));
+ assertEquals("?", vars.get("VAR5_4"));
+ assertNull(vars.get("VAR5_5"));
+ }
+
// Create the SplitFile function and set its parameters.
private static SplitFunction splitParams(String p1, String p2, String p3) throws Exception {
SplitFunction split = new SplitFunction();
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 79c70d79a24..e80edad1dcb 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -195,6 +195,7 @@ however, the profile can't be updated while the test is running.
672Add more details to documentation for timeShift function. Contributed by Mariusz (mawasak at gmail.com)
Updated Gradle to 7.3 (from 7.2)
689Code clean up in StringFromFile. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
+
690Refactor a few unit tests. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
From abb069cc8e72c8e57eb8835bf3ceb26e4bb91416 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Sat, 15 Jan 2022 22:18:30 +0300
Subject: [PATCH 025/736] ci: terminate stale GitHub CI jobs early
For instance, when several commits are pushed to PR in short sequence,
older CI jobs would be terminated immediately so the newer commits are tested faster.
---
.github/workflows/main.yml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3c65a5412ed..de80c5e9eec 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -10,6 +10,13 @@ on:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
+concurrency:
+ # On master/release, we don't want any jobs cancelled so the sha is used to name the group
+ # On PR branches, we cancel the job if new commits are pushed
+ # More info: https://stackoverflow.com/a/68422069/253468
+ group: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
+ cancel-in-progress: true
+
jobs:
windows:
name: 'Windows (JDK 17)'
From 6a5cac0ad75e72d5313f3c795845c6cea9ff6520 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Tue, 18 Jan 2022 17:36:49 +0100
Subject: [PATCH 026/736] JSON Assertion always successful with indefinite
paths
Add a note to the component reference for JSON Path Assertions
Bugzilla Id: 65794
---
xdocs/changes.xml | 2 ++
xdocs/usermanual/component_reference.xml | 3 +++
2 files changed, 5 insertions(+)
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index e80edad1dcb..6f56b600c49 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -253,6 +253,7 @@ however, the profile can't be updated while the test is running.
Documentation
+
65794JSON Assertion always successful with indefinite paths
General
@@ -300,6 +301,7 @@ however, the profile can't be updated while the test is running.
We also thank bug reporters who helped us improve JMeter.
Nikola Aleksic (nalexic at gmail.com)
+
Vladimir Rosu (rosuvladimir at gmail.com)
Apologies if we have omitted anyone else.
diff --git a/xdocs/usermanual/component_reference.xml b/xdocs/usermanual/component_reference.xml
index 02b9cf90b05..985918c93ff 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -5035,6 +5035,9 @@ please ensure that you select "Store the message using MIME (raw)"
Second, it will search for specified path, using syntax from Jayway JsonPath 1.2.0. If the path is not found, it will fail.
Third, if JSON path was found in the document, and validation against expected value was requested, it will perform validation. For the null value there is special checkbox in the GUI.
Note that if the path will return array object, it will be iterated and if expected value is found, the assertion will succeed. To validate empty array use [] string. Also, if patch will return dictionary object, it will be converted to string before comparison.
+ When using indefinite JSON Paths
+ you must assert the value due to the existing JSON library implementation, otherwise the assertion could always
+ return successful
From 278255de85829c850d36ad1655d1541e66d5368f Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 15 Jan 2022 18:11:36 +0100
Subject: [PATCH 027/736] Fail JSONPath Assertion on indefinite paths and no
assertion value
The docs for JSONPath Assertion state, that it will fail the assertion,
when no element is found with the given JSON path. This was currently
not followed, when an indefinite path was used. In such a case, the
JSONPath library would return an empty list, which the assertion logic
would log as OK.
With this change we let the assertion fail, when
* an indefinite path was given
* and an empty list is extracted
* and no assertion value is given
Bugzilla Id: 65794
---
.../apache/jmeter/assertions/JSONPathAssertion.java | 10 ++++++++--
.../jmeter/assertions/TestJSONPathAssertion.java | 6 +++++-
xdocs/changes.xml | 2 +-
xdocs/usermanual/component_reference.xml | 4 +++-
4 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
index 2e135b46b21..c2986df1cd8 100644
--- a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
+++ b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
@@ -30,12 +30,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.jayway.jsonpath.JsonPath;
+
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
-import com.jayway.jsonpath.JsonPath;
-
/**
* This is main class for JSONPath Assertion which verifies assertion on
* previous sample result using JSON path expression
@@ -112,6 +112,12 @@ private void doAssert(String jsonString) {
Object value = JsonPath.read(jsonString, getJsonPath());
if (!isJsonValidationBool()) {
+ if (value instanceof JSONArray) {
+ JSONArray arrayValue = (JSONArray) value;
+ if (arrayValue.isEmpty() && !JsonPath.isPathDefinite(getJsonPath())) {
+ throw new IllegalStateException("JSONPath is indefinite and the extracted Value is an empty Array. Please use an assertion value, to be sure to get a correct result. " + getExpectedValue());
+ }
+ }
return;
}
diff --git a/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java b/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
index f4245f21638..a6738c30a43 100644
--- a/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
+++ b/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
@@ -22,6 +22,7 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import java.nio.charset.Charset;
import java.util.Locale;
import org.apache.jmeter.samplers.SampleResult;
@@ -270,6 +271,9 @@ void testGetResult_list_negative() {
@Test
void testGetResult_list_empty_novalidate() {
+ // With bug 65794 the outcome of this test has changed
+ // we now consider an indefinite path with no assertion value
+ // an error and set the AssertionResult to failure
SampleResult samplerResult = new SampleResult();
samplerResult.setResponseData("{\"myval\": []}".getBytes());
@@ -279,7 +283,7 @@ void testGetResult_list_empty_novalidate() {
AssertionResult expResult = new AssertionResult("");
AssertionResult result = instance.getResult(samplerResult);
assertEquals(expResult.getName(), result.getName());
- assertFalse(result.isFailure());
+ assertTrue(result.isFailure());
}
@Test
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 6f56b600c49..89c936b95b2 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -237,6 +237,7 @@ however, the profile can't be updated while the test is running.
65681Use default values for null values when extracting with JSONPostProcessor
Allow setters in ConstantThroughputTimer to updating the values during the run time
65782Use correct message format for MessageFormat in HTMLAssertion
+
65794JSON Assertion always successful with indefinite paths
Functions
@@ -253,7 +254,6 @@ however, the profile can't be updated while the test is running.
Documentation
-
65794JSON Assertion always successful with indefinite paths
General
diff --git a/xdocs/usermanual/component_reference.xml b/xdocs/usermanual/component_reference.xml
index 985918c93ff..d1fdfb8d216 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -5037,7 +5037,9 @@ please ensure that you select "Store the message using MIME (raw)"
Note that if the path will return array object, it will be iterated and if expected value is found, the assertion will succeed. To validate empty array use [] string. Also, if patch will return dictionary object, it will be converted to string before comparison.
When using indefinite JSON Paths
you must assert the value due to the existing JSON library implementation, otherwise the assertion could always
- return successful
+ return successful.
+ Since JMeter version 5.5 the assertion will fail, if an indefinite path is given, an empty list is extracted and
+ no assertion value is set.
From 3e54034a25f2ce0582fb52b00322fdbbc6591136 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 19 Jan 2022 19:33:04 +0100
Subject: [PATCH 028/736] Fix markup for components reference
Broken with last commit for JSON Path Assertion
Bugzilla Id: 65794
---
xdocs/usermanual/component_reference.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xdocs/usermanual/component_reference.xml b/xdocs/usermanual/component_reference.xml
index d1fdfb8d216..5aff4f054cd 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -5037,7 +5037,7 @@ please ensure that you select "Store the message using MIME (raw)"
Note that if the path will return array object, it will be iterated and if expected value is found, the assertion will succeed. To validate empty array use [] string. Also, if patch will return dictionary object, it will be converted to string before comparison.
When using indefinite JSON Paths
you must assert the value due to the existing JSON library implementation, otherwise the assertion could always
- return successful.
+ return successful.
Since JMeter version 5.5 the assertion will fail, if an indefinite path is given, an empty list is extracted and
no assertion value is set.
From 980e5b8975948bb0dab45b735d88901c185b00a4 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 19 Jan 2022 19:53:12 +0100
Subject: [PATCH 029/736] Apply autostyle to imports changed with last commit
Bugzilla Id: 65794
---
.../java/org/apache/jmeter/assertions/JSONPathAssertion.java | 4 ++--
.../org/apache/jmeter/assertions/TestJSONPathAssertion.java | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
index c2986df1cd8..91325dc15a8 100644
--- a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
+++ b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
@@ -30,12 +30,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.jayway.jsonpath.JsonPath;
-
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
+import com.jayway.jsonpath.JsonPath;
+
/**
* This is main class for JSONPath Assertion which verifies assertion on
* previous sample result using JSON path expression
diff --git a/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java b/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
index a6738c30a43..8447977d687 100644
--- a/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
+++ b/src/components/src/test/java/org/apache/jmeter/assertions/TestJSONPathAssertion.java
@@ -22,7 +22,6 @@
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
-import java.nio.charset.Charset;
import java.util.Locale;
import org.apache.jmeter.samplers.SampleResult;
From b953b45099351cc13e0a07afe0c8ba43fc420f10 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 19 Jan 2022 19:58:37 +0100
Subject: [PATCH 030/736] Line too long
Bugzilla Id: 65794
---
.../java/org/apache/jmeter/assertions/JSONPathAssertion.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
index 91325dc15a8..98aeca67250 100644
--- a/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
+++ b/src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
@@ -115,7 +115,8 @@ private void doAssert(String jsonString) {
if (value instanceof JSONArray) {
JSONArray arrayValue = (JSONArray) value;
if (arrayValue.isEmpty() && !JsonPath.isPathDefinite(getJsonPath())) {
- throw new IllegalStateException("JSONPath is indefinite and the extracted Value is an empty Array. Please use an assertion value, to be sure to get a correct result. " + getExpectedValue());
+ throw new IllegalStateException("JSONPath is indefinite and the extracted Value is an empty Array." +
+ " Please use an assertion value, to be sure to get a correct result. " + getExpectedValue());
}
}
return;
From d87a25bb1908293322a523d91050f30a459139d7 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Mon, 24 Jan 2022 19:02:10 +0100
Subject: [PATCH 031/736] Fix typo (mainly to trigger buildbot)
---
xdocs/usermanual/include_controller_tutorial.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xdocs/usermanual/include_controller_tutorial.xml b/xdocs/usermanual/include_controller_tutorial.xml
index 065b3561de1..145dfdebaa7 100644
--- a/xdocs/usermanual/include_controller_tutorial.xml
+++ b/xdocs/usermanual/include_controller_tutorial.xml
@@ -38,7 +38,7 @@ in a couple of ways.
-
the Include Controller loads a simple controller with all it's samples, where as the Module
+
the Include Controller loads a simple controller with all its samples, where as the Module
Controller can use any controller
the Include Controller doesn't use the workbench
the Module Controller doesn't load from a file
From 160ec244b7da7e8dd35fa1ca1d2591218375ec0a Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Mon, 24 Jan 2022 19:08:52 +0100
Subject: [PATCH 032/736] Correct more typos (it's vs. its)
---
xdocs/usermanual/component_reference.xml | 4 ++--
xdocs/usermanual/jmeter_tutorial.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/xdocs/usermanual/component_reference.xml b/xdocs/usermanual/component_reference.xml
index 5aff4f054cd..00b8ed21cda 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -1211,7 +1211,7 @@ props.put("PROP1","1234");
Name of a file to be used as a JSR223 script, if a relative file path is used, then it will be relative to directory referenced by "user.dir" System propertyList of parameters to be passed to the script file or the script.
- If checked (advised) and the language used supports Compilable interface (Groovy is one of these, java, beanshell and javascript are not), JMeter will compile the Script and cache it using it's MD5 hash as unique cache key
+ If checked (advised) and the language used supports Compilable interface (Groovy is one of these, java, beanshell and javascript are not), JMeter will compile the Script and cache it using its MD5 hash as unique cache keyScript to be passed to JSR223 language
@@ -6044,7 +6044,7 @@ extracting the node as text or attribute value and store the result into the giv
use namespaces than with the old XPathExtractor version.
To allow for use in a , it works exactly the same as the above XPath Extractor
-
XPath2 Extractor provides some interestings tools such as an improved syntax and much more functions than in it's first version.
+
XPath2 Extractor provides some interestings tools such as an improved syntax and much more functions than in its first version.
Here are some exemples:
abs(/book/page[2])
diff --git a/xdocs/usermanual/jmeter_tutorial.xml b/xdocs/usermanual/jmeter_tutorial.xml
index fe5e7f0b425..f32a8d0f887 100644
--- a/xdocs/usermanual/jmeter_tutorial.xml
+++ b/xdocs/usermanual/jmeter_tutorial.xml
@@ -768,7 +768,7 @@ JMeter's src/components directory).
attention to your properties. These properties will become the basis of a GUI form by
which users will configure the CSVDataSet element.
-
Your element will be cloned by JMeter when the test starts. Each thread will get it's
+
Your element will be cloned by JMeter when the test starts. Each thread will get its
own instance. However, you will have a chance to control how the cloning is done, if
you need it.
I then implemented the IterationStart method of the LoopIterationListener interface.
The point of this "event" is that your component is notified of when the test has entered
- it's parent controller. For our purposes, every time the CSVDataSet's parent controller
+ its parent controller. For our purposes, every time the CSVDataSet's parent controller
is entered, we will read a new line of the data file and set the variables. Thus, for a
regular controller, each loop through the test will result in a new set of values being
read. For a loop controller, each iteration will do likewise. Every test thread will get
From 04548fd2081def422d3756907823406691290c7e Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Mon, 24 Jan 2022 20:35:21 +0100
Subject: [PATCH 033/736] Use English typographic conventions for colons (no
space in front)
---
xdocs/usermanual/generating-dashboard.xml | 26 +++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/xdocs/usermanual/generating-dashboard.xml b/xdocs/usermanual/generating-dashboard.xml
index 912b9255792..49ee7fc1763 100644
--- a/xdocs/usermanual/generating-dashboard.xml
+++ b/xdocs/usermanual/generating-dashboard.xml
@@ -42,23 +42,23 @@
APDEX (Application Performance Index) table that computes for every transaction the APDEX based on configurable values for tolerated and satisfied thresholds
A request summary graph showing the Success and failed requests (Transaction Controller Sample Results are not taken into account) percentage:
-
A Statistics table providing in one table a summary of all metrics per transaction including 3 configurable percentiles :
-
An error table providing a summary of all errors and their proportion in the total requests :
-
A Top 5 Errors by Sampler table providing for every Sampler (excluding Transaction Controller by default) the top 5 Errors :
+
A Statistics table providing in one table a summary of all metrics per transaction including 3 configurable percentiles:
+
An error table providing a summary of all errors and their proportion in the total requests:
+
A Top 5 Errors by Sampler table providing for every Sampler (excluding Transaction Controller by default) the top 5 Errors:
Zoomable chart where you can check/uncheck every transaction to show/hide it for:
-
Response times Over Time (Includes Transaction Controller Sample Results) :
-
Response times Percentiles Over Time (successful responses only) :
-
Active Threads Over Time :
-
Bytes throughput Over Time (Ignores Transaction Controller Sample Results) :
-
Latencies Over Time (Includes Transaction Controller Sample Results) :
-
Connect Time Over Time (Includes Transaction Controller Sample Results) :
+
Response times Over Time (Includes Transaction Controller Sample Results):
+
Response times Percentiles Over Time (successful responses only):
+
Active Threads Over Time:
+
Bytes throughput Over Time (Ignores Transaction Controller Sample Results):
+
Latencies Over Time (Includes Transaction Controller Sample Results):
+
Connect Time Over Time (Includes Transaction Controller Sample Results):
Hits per second (Ignores Transaction Controller Sample Results):
Response codes per second (Ignores Transaction Controller Sample Results):
Transactions per second (Includes Transaction Controller Sample Results):
Response Time vs Request per second (Ignores Transaction Controller Sample Results):
Latency vs Request per second (Ignores Transaction Controller Sample Results):
-
Response time Overview (Excludes Transaction Controller Sample Results) :
+
Response time Overview (Excludes Transaction Controller Sample Results):
Response times percentiles (Includes Transaction Controller Sample Results):
Times vs Threads (Includes Transaction Controller Sample Results):
In distributed mode, this graph shows a horizontal axis the number of threads for 1 server. It's a current limitation
@@ -215,9 +215,9 @@ jmeter.save.saveservice.timestamp_format = ms
Percentiles used by Summary table and Percentile graphs can be adjusted to different values by using the 3 properties:
-
aggregate_rpt_pct1 : Defaults to 90
-
aggregate_rpt_pct2 : Defaults to 95
-
aggregate_rpt_pct3 : Defaults to 99
+
aggregate_rpt_pct1: Defaults to 90
+
aggregate_rpt_pct2: Defaults to 95
+
aggregate_rpt_pct3: Defaults to 99
Relative paths are built from the JMeter working directory
From 85580b49ee2f06505129ebccac5d382e412c58e2 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Mon, 24 Jan 2022 20:51:01 +0100
Subject: [PATCH 034/736] Whitespace change (remove tab, as we normally use
spaces here)
---
xdocs/usermanual/properties_reference.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xdocs/usermanual/properties_reference.xml b/xdocs/usermanual/properties_reference.xml
index d4b05a2166b..e373627838d 100644
--- a/xdocs/usermanual/properties_reference.xml
+++ b/xdocs/usermanual/properties_reference.xml
@@ -117,7 +117,7 @@ defined in the system.properties file or on the command-line. The
JVM does not support the specified cipher suites, or if the cipher suites
supported by the HTTPS server do not overlap this list. See the
JSSE
- Reference Guide.
+ Reference Guide.
For example:
If not specified, JMeter will use the default list of cipher suites
supported by the JVM.
From 25932ff6b7b1364a27c46bd0f1e35dc7fac0a209 Mon Sep 17 00:00:00 2001
From: Stefan Seide
Date: Tue, 25 Jan 2022 13:35:41 +0100
Subject: [PATCH 035/736] Update tika-parsers to 1.28, jackson to 2.13.1 and
jsoup to 1.14.3
Detailed version updates are:
Updated jsoup from 1.14.1 (in nightlies), from 1.13.1 (last released)
Updated Apache Tika from 1.27 (in nightlies), from 1.26 (last released)
Updated jackson to 2.13.1 (from 2.10.5)
Closes #695
---
gradle.properties | 8 ++++----
src/dist/src/dist/expected_release_jars.csv | 12 ++++++------
xdocs/changes.xml | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index df7baa176cc..23207fddbef 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -98,8 +98,8 @@ httpclient.version=4.5.13
httpcore-nio.version=4.4.14
httpcore.version=4.4.14
httpmime.version=4.5.13
-jackson.version=2.10.5
-jackson-databind.version=2.10.5
+jackson.version=2.13.1
+jackson-databind.version=2.13.1
javax.activation.version=1.2.0
jcharts.version=0.7.5
jdom.version=1.1.3
@@ -109,7 +109,7 @@ jmespath-jackson.version=0.5.0
jodd.version=5.0.13
json-path.version=2.6.0
json-smart.version=2.4.7
-jsoup.version=1.14.1
+jsoup.version=1.14.3
jtidy.version=r938
junit4.version=4.13.2
junit5.version=5.8.1
@@ -132,7 +132,7 @@ slf4j.version=1.7.32
spock-core.version=2.0-M2-groovy-3.0
springframework.version=4.3.17.RELEASE
svgSalamander.version=1.1.2.4
-tika.version=1.27
+tika.version=1.28
xalan.version=2.7.2
xercesImpl.version=2.12.1
xml-apis.version=1.4.01
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index 3cd09108c19..a43c8d348bf 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -69,9 +69,9 @@
328436,httpcore-4.4.14.jar
369365,httpcore-nio-4.4.14.jar
41790,httpmime-4.5.13.jar
-68080,jackson-annotations-2.10.5.jar
-349331,jackson-core-2.10.5.jar
-1404939,jackson-databind-2.10.5.jar
+75717,jackson-annotations-2.13.1.jar
+374588,jackson-core-2.13.1.jar
+1534017,jackson-databind-2.13.1.jar
78030,javax.activation-1.2.0.jar
142391,jcharts-0.7.5.jar
16630,jcl-over-slf4j-1.7.32.jar
@@ -83,7 +83,7 @@
26047,jodd-props-5.0.13.jar
238605,json-path-2.6.0.jar
119227,json-smart-2.4.7.jar
-415074,jsoup-1.14.1.jar
+423395,jsoup-1.14.3.jar
249924,jtidy-r938.jar
384581,junit-4.13.2.jar
32033,kotlin-logging-jvm-2.0.5.jar
@@ -121,8 +121,8 @@
301279,svgSalamander-1.1.2.4.jar
10192,swing-extensions-laf-support-0.1.3.jar
2539,swing-extensions-visual-padding-0.1.3.jar
-734528,tika-core-1.27.jar
-1397879,tika-parsers-1.27.jar
+735635,tika-core-1.28.jar
+1585374,tika-parsers-1.28.jar
174661,vis-svg-portable-jvm-2.2.1.jar
3154938,xalan-2.7.2.jar
1386502,xercesImpl-2.12.1.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 89c936b95b2..e45c4afcd95 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -167,13 +167,12 @@ however, the profile can't be updated while the test is running.
Updated Apache commons-pool2 to 2.11.0 (from 2.9.0).
Updated equalsverifier to 3.7 (from 3.4.2).
Updated Apache Freemarker to 2.3.31 (from 2.3.30).
-
Updated hsqldb to 2.5.2 (from 2.5.0).
Updated hsqldb to 2.6.0 (from 2.5.0).
Updated Apache HttpClient to 4.5.13 (from 4.5.12).
Updated Apache HttpCore to 4.4.14 (from 4.4.13).
Updated jacoco to 0.8.7 (from 0.8.5).
Updated json-path to 2.6.0 (from 2.4.0).
-
Updated jsoup to 1.14.1 (from 1.13.1).
+
Updated jsoup to 1.14.3 (from 1.13.1).
Updated JUnit to 4.13.2 and 5.8.1 (from 4.13.1 and 5.7.0).
Updated Apache log4j2 to 2.17.1 (from 2.13.3).
Updated Miglayout to 5.3 (from 5.2).
@@ -184,9 +183,10 @@ however, the profile can't be updated while the test is running.
671Move example definition of property jmeter.reportgenerator.statistic_window
to user.properties, as it is read from that place.
Contributed by Rithvik Patibandla (rithvikp98 at gmail.com)
From 6196e403091c2d9cf2f7d1ea6aa1610efab73e37 Mon Sep 17 00:00:00 2001
From: Sampath Kumar Krishnasamy
Date: Thu, 13 Jan 2022 18:14:26 +0000
Subject: [PATCH 036/736] Fixed the deprecation warnings in build file
Closes #692
---
build.gradle.kts | 6 +++---
xdocs/changes.xml | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index 19944b72401..97eccfa8262 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -207,7 +207,7 @@ fun SonarQubeProperties.add(name: String, valueProvider: () -> String) {
}
if (jacocoEnabled) {
- val mergedCoverage = jacocoReport.get().reports.xml.destination.toString()
+ val mergedCoverage = jacocoReport.get().reports.xml.outputLocation.toString()
// For every module we pass merged coverage report
// That enables to see ":src:core" lines covered even in case they are covered from
@@ -493,8 +493,8 @@ allprojects {
tasks.withType().configureEach {
reports {
- html.isEnabled = reportsForHumans()
- xml.isEnabled = !reportsForHumans()
+ html.required.set(reportsForHumans())
+ xml.required.set(!reportsForHumans())
}
}
// Add each project to combined report
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index e45c4afcd95..3877b556b1a 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -196,6 +196,7 @@ however, the profile can't be updated while the test is running.
Updated Gradle to 7.3 (from 7.2)
689Code clean up in StringFromFile. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
690Refactor a few unit tests. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
+
692>Fix a few deprecation warnings for Gradle. Contributed by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
From 97c969865abdb0c7e01731b856a234441367b499 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 2 Feb 2022 12:06:07 +0100
Subject: [PATCH 037/736] Use isEmtpy instead of checking length
---
.../apache/jmeter/protocol/http/proxy/FormCharSetFinder.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
index 84b595a227b..9588cde061e 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
@@ -67,7 +67,7 @@ public void addFormActionsAndCharSet(String html, Map formEncodi
// Just use the first one of the possible many charsets
if(charSets.length > 0) {
formCharSet = charSets[0].trim();
- if(formCharSet.length() == 0) {
+ if (formCharSet.isEmpty()) {
formCharSet = null;
}
}
From 48dc723d22c52b5605022a8739c9bf65fd0be1ca Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 2 Feb 2022 12:07:17 +0100
Subject: [PATCH 038/736] Use space between if and parenthesis
if is not a function.
---
.../jmeter/protocol/http/proxy/FormCharSetFinder.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
index 9588cde061e..77b3fe22fb7 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
@@ -62,17 +62,17 @@ public void addFormActionsAndCharSet(String html, Map formEncodi
String formCharSet = pageEncoding;
String acceptCharSet = element.attr("accept-charset");
// Check if we found an accept-charset attribute on the form
- if(acceptCharSet != null) {
+ if (acceptCharSet != null) {
String[] charSets = JOrphanUtils.split(acceptCharSet, ",");
// Just use the first one of the possible many charsets
- if(charSets.length > 0) {
+ if (charSets.length > 0) {
formCharSet = charSets[0].trim();
if (formCharSet.isEmpty()) {
formCharSet = null;
}
}
}
- if(formCharSet != null) {
+ if (formCharSet != null) {
formEncodings.put(action, formCharSet);
}
}
From a1b170de57f7f32a333aec2db9bb4d1823f44258 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 2 Feb 2022 16:49:57 +0100
Subject: [PATCH 039/736] Catch NullPointerException from JSoup when recording
a test plan
As reported in the bug issue, JSoup throws a NPE on some input.
When we know more about that input, we might be able to do
better, for now, let us wrap the exception into the declared
HTMLParseException and hope, that we can continue.
Bugzilla Id: 65864
---
.../jmeter/protocol/http/proxy/FormCharSetFinder.java | 6 +++++-
xdocs/changes.xml | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
index 77b3fe22fb7..43e3395aaaa 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
@@ -52,7 +52,11 @@ public void addFormActionsAndCharSet(String html, Map formEncodi
throws HTMLParseException {
log.debug("Parsing html of: {}", html);
- Document document = Jsoup.parse(html);
+ try {
+ Document document = Jsoup.parse(html);
+ } catch (RuntimeException e) {
+ throw new HTMLParseException("Could not parse HTML to look for forms charsets", e);
+ }
Elements forms = document.select("form");
for (Element element : forms) {
String action = element.attr("action");
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 3877b556b1a..2f86ec86bde 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -210,6 +210,7 @@ however, the profile can't be updated while the test is running.
65363NullPointerException in HTTPHC4Impl$ManagedCredentialsProvider.getAuthorizationForAuthScope when 401 response from remote and httpclient4.auth.preemptive=false
65692HTTP(s) Test Script Recorder: Enable setting enabled cipher suite and enabled protocols on SSLContext/ Align ssl properties between Java and HC4 impl
65864Catch NullPointerException from JSoup when recording a test plan
Other Samplers
From 3a74a92b298b0d32cfc96a689c8fc95125201dde Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Wed, 2 Feb 2022 16:56:54 +0100
Subject: [PATCH 040/736] Catch NullPointerException from JSoup when recording
a test plan
Fix stupid bug, where I placed the declaration of the method
variable inside the try-catch block.
Bugzilla Id: 65864
---
.../apache/jmeter/protocol/http/proxy/FormCharSetFinder.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
index 43e3395aaaa..d577f320284 100644
--- a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
+++ b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/FormCharSetFinder.java
@@ -52,8 +52,9 @@ public void addFormActionsAndCharSet(String html, Map formEncodi
throws HTMLParseException {
log.debug("Parsing html of: {}", html);
+ Document document;
try {
- Document document = Jsoup.parse(html);
+ document = Jsoup.parse(html);
} catch (RuntimeException e) {
throw new HTMLParseException("Could not parse HTML to look for forms charsets", e);
}
From 755302aacda5468d8c1631b78607a900073fb961 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Sun, 13 Feb 2022 12:59:35 +0300
Subject: [PATCH 041/736] Add a checksum for
gradle-enterprise-gradle-plugin-3.8.1.jar for Gradle 7.4+
---
settings.gradle.kts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/settings.gradle.kts b/settings.gradle.kts
index e27df11c67c..8fce3cdecca 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -151,6 +151,8 @@ val expectedSha512 = mapOf(
to "gradle-enterprise-gradle-plugin-3.7.2.jar",
"24A1722CB574BA3126C3C6EBEB3D4A39D2A86ECCEDD378BA96A5508626D1AEAC7BB5FFBC189929E16900B94C1D016AFA83A462DCB2BB03F634FCA9C7FDE9EBA5"
to "gradle-enterprise-gradle-plugin-3.8.jar",
+ "11BED06D6ECD5669DE3F32A0B386A223C2B2BA532A3C80D3E1613B29A1A264E1A75CDF142273F17EE1845287C76CF1F9D68CD97542318B1A9126104CE958824A"
+ to "gradle-enterprise-gradle-plugin-3.8.1.jar",
"FA305ACAAF45D005F5032D93C4F37CD097936C802943885A8F2B9EC27DA24F148DB41748655347C9A707C62614087432B3D32CC1B297381D45F3D8063BFFFA6D"
to "bcpg-jdk15on-1.62.jar",
"2BA6A5DEC9C8DAC2EB427A65815EB3A9ADAF4D42D476B136F37CD57E6D013BF4E9140394ABEEA81E42FBDB8FC59228C7B85C549ED294123BF898A7D048B3BD95"
From dbbe8e6e353dc996f57b776b5948fc6b0cfde5a4 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Mon, 17 Jan 2022 12:03:52 +0300
Subject: [PATCH 042/736] [Bug 63620] Fix GUI freeze when viewing response body
with long lines
GUI gets unresponsive when the response contains long lines (e.g lines exceeding 100K chars).
The workaround is to add artificial line breaks.
We try to break on word boundaries first, and if not possible,
we break on char boundaries (e.g. large chunks of base64 data).
view.results.tree.max_line_size=110000 (defaults to 110K)
view.results.tree.soft_wrap_line_size=100000 (defaults to max_line_size/1.1)
CPU spin trace looks as follows:
"AWT-EventQue...
...
at sun.font.GlyphLayout.layout(Unknown Source)
...
at java.awt.font.TextLine.(Unknown Source)
at java.awt.font.TextMeasurer.makeTextLineOnRange(Unknown Source)
at java.awt.font.TextMeasurer.getLayout(Unknown Source)
...
at javax.swing.text.JTextComponent.setDocument(Unknown Source)
at org.apache.jmeter.visualizers.SamplerResultTab.setTextOptimized(SamplerResultTab.java:695)
...
---
bin/jmeter.properties | 7 +
.../RenderAsBoundaryExtractor.java | 1 +
.../jmeter/visualizers/RenderAsCssJQuery.java | 1 +
.../jmeter/visualizers/RenderAsRegexp.java | 1 +
.../jmeter/visualizers/RenderAsXPath.java | 1 +
.../jmeter/visualizers/RenderAsXPath2.java | 1 +
.../jmeter/visualizers/SamplerResultTab.java | 1 +
.../ViewResultsFullVisualizer.java | 23 +++
.../org/apache/jorphan/util/StringWrap.java | 166 ++++++++++++++++++
.../apache/jorphan/util/StringWrapTest.java | 61 +++++++
xdocs/changes.xml | 1 +
xdocs/usermanual/properties_reference.xml | 12 ++
12 files changed, 276 insertions(+)
create mode 100644 src/jorphan/src/main/java/org/apache/jorphan/util/StringWrap.java
create mode 100644 src/jorphan/src/test/java/org/apache/jorphan/util/StringWrapTest.java
diff --git a/bin/jmeter.properties b/bin/jmeter.properties
index 447b3649f0e..c77877efa6e 100644
--- a/bin/jmeter.properties
+++ b/bin/jmeter.properties
@@ -1180,6 +1180,13 @@ cookies=cookies
# Set to 0 to disable the size check and display the whole response
#view.results.tree.max_size=10485760
+# UI gets unresponsive when response contains very long lines,
+# So we break lines by adding artificial line breaks
+# The break is introduced somewhere in between soft_wrap_line_size..max_line_size
+# We try to break on word boundaries first
+#view.results.tree.max_line_size=110000
+#view.results.tree.soft_wrap_line_size=100000
+
# Order of Renderers in View Results Tree
# Note full class names should be used for non JMeter core renderers
# For JMeter core renderers, class names start with '.' and are automatically
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsBoundaryExtractor.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsBoundaryExtractor.java
index 0af0cdacf17..e48002e246f 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsBoundaryExtractor.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsBoundaryExtractor.java
@@ -212,6 +212,7 @@ public void setSamplerResult(Object userObject) {
public void renderResult(SampleResult sampleResult) {
clearData();
String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
+ response = ViewResultsFullVisualizer.wrapLongLines(response);
boundaryExtractorDataField.setText(response);
boundaryExtractorDataField.setCaretPosition(0);
}
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsCssJQuery.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsCssJQuery.java
index eff86a9be55..e802246feab 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsCssJQuery.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsCssJQuery.java
@@ -145,6 +145,7 @@ private String process(String textToParse) {
public void renderResult(SampleResult sampleResult) {
clearData();
String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
+ response = ViewResultsFullVisualizer.wrapLongLines(response);
cssJqueryDataField.setText(response);
cssJqueryDataField.setCaretPosition(0);
}
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsRegexp.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsRegexp.java
index 66d74fb0021..f598e0a1efa 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsRegexp.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsRegexp.java
@@ -143,6 +143,7 @@ private String process(String textToParse) {
public void renderResult(SampleResult sampleResult) {
clearData();
String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
+ response = ViewResultsFullVisualizer.wrapLongLines(response);
regexpDataField.setText(response);
regexpDataField.setCaretPosition(0);
}
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath.java
index 2399f56db2c..f8e6ea51e8e 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath.java
@@ -180,6 +180,7 @@ private Document parseResponse(String unicodeData, XPathExtractor extractor)
@Override
public void renderResult(SampleResult sampleResult) {
String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
+ response = ViewResultsFullVisualizer.wrapLongLines(response);
try {
xmlDataField.setText(response == null ? "" : response);
xmlDataField.setCaretPosition(0);
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath2.java b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath2.java
index b55ffcbac01..4dd8acf151a 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath2.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/RenderAsXPath2.java
@@ -164,6 +164,7 @@ private String getDocumentNamespaces(String textToParse) {
@Override
public void renderResult(SampleResult sampleResult) {
String response = ViewResultsFullVisualizer.getResponseAsString(sampleResult);
+ response = ViewResultsFullVisualizer.wrapLongLines(response);
try {
xmlDataField.setText(response == null ? "" : response);
xmlDataField.setCaretPosition(0);
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java b/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
index 3828c2a571d..f6d17f6e2a9 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
@@ -688,6 +688,7 @@ protected void setTextOptimized(String data) {
Document blank = new DefaultStyledDocument();
results.setDocument(blank);
try {
+ data = ViewResultsFullVisualizer.wrapLongLines(data);
document.insertString(0, data == null ? "" : data, null);
} catch (BadLocationException ex) {
LOGGER.error("Error inserting text", ex);
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java b/src/components/src/main/java/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
index d4520d55820..3a549ba9c1e 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java
@@ -74,6 +74,8 @@
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jmeter.visualizers.gui.AbstractVisualizer;
import org.apache.jorphan.gui.JMeterUIDefaults;
+import org.apache.jorphan.util.StringWrap;
+import org.apiguardian.api.API;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -103,6 +105,14 @@ public class ViewResultsFullVisualizer extends AbstractVisualizer
private static final int MAX_DISPLAY_SIZE =
JMeterUtils.getPropDefault("view.results.tree.max_size", 10485760); // $NON-NLS-1$
+ // Default limited to 110K
+ private static final int MAX_LINE_SIZE =
+ JMeterUtils.getPropDefault("view.results.tree.max_line_size", 110000); // $NON-NLS-1$
+
+ // Limit the soft wrap to 100K (hard limit divided by 1.1)
+ private static final int SOFT_WRAP_LINE_SIZE =
+ JMeterUtils.getPropDefault("view.results.tree.soft_wrap_line_size", (int) (MAX_LINE_SIZE / 1.1f)); // $NON-NLS-1$
+
// default display order
private static final String VIEWERS_ORDER =
JMeterUtils.getPropDefault("view.results.tree.renderers_order", ""); // $NON-NLS-1$ //$NON-NLS-2$
@@ -563,6 +573,19 @@ public static String getResponseAsString(SampleResult res) {
return response;
}
+ @API(status = API.Status.INTERNAL, since = "5.5")
+ public static String wrapLongLines(String input) {
+ if (input == null || input.isEmpty()) {
+ return input;
+ }
+ if (SOFT_WRAP_LINE_SIZE > 0 && MAX_LINE_SIZE > 0) {
+ StringWrap stringWrap = new StringWrap(SOFT_WRAP_LINE_SIZE, MAX_LINE_SIZE);
+ return stringWrap.wrap(input, "\n");
+ }
+ return input;
+ }
+
+
private static class ResultsNodeRenderer extends DefaultTreeCellRenderer {
private static final long serialVersionUID = 4159626601097711565L;
diff --git a/src/jorphan/src/main/java/org/apache/jorphan/util/StringWrap.java b/src/jorphan/src/main/java/org/apache/jorphan/util/StringWrap.java
new file mode 100644
index 00000000000..b36f66ad490
--- /dev/null
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/StringWrap.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jorphan.util;
+
+import java.text.BreakIterator;
+
+import org.apiguardian.api.API;
+
+/**
+ * Wraps text in such a way so the lines do not exceed given maximum length.
+ */
+@API(since = "5.5", status = API.Status.EXPERIMENTAL)
+public class StringWrap {
+ private final int minWrap;
+ private final int maxWrap;
+
+ private final BreakCursor wordCursor = new BreakCursor(BreakIterator.getLineInstance());
+ private final BreakCursor charCursor = new BreakCursor(BreakIterator.getCharacterInstance());
+
+ /**
+ * Stores the current and the next position for a given {@link BreakIterator}.
+ * It allows reducing the number of calls to {@link BreakIterator}.
+ */
+ private static class BreakCursor {
+ private static final int UNINITIALIZED = -2;
+
+ private final BreakIterator iterator;
+ private int pos;
+ private int next;
+
+ BreakCursor(BreakIterator iterator) {
+ this.iterator = iterator;
+ }
+
+ void setText(String text) {
+ iterator.setText(text);
+ pos = 0;
+ next = UNINITIALIZED;
+ }
+
+ public int getPos() {
+ return pos;
+ }
+
+ /**
+ * Advances the cursor if possible.
+ * @param startWrap the start index of the wrap to consider
+ * @param endWrap the end index of the wrap to consider
+ * @return true if the next break is detected within startWrap..endWrap boundaries
+ */
+ public boolean advance(int startWrap, int endWrap) {
+ if (pos == BreakIterator.DONE || pos > endWrap) {
+ return false;
+ }
+ pos = next != UNINITIALIZED ? next : iterator.following(startWrap);
+ if (pos == BreakIterator.DONE || pos > endWrap) {
+ return false;
+ }
+ // Try adding more items up to endWrap
+ while (true) {
+ next = iterator.next();
+ if (next == BreakIterator.DONE || next > endWrap) {
+ break;
+ }
+ pos = next;
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Creates string wrapper instance.
+ *
+ * @param minWrap minimal word length for the wrap
+ * @param maxWrap maximum word length for the wrap
+ */
+ public StringWrap(int minWrap, int maxWrap) {
+ this.minWrap = minWrap;
+ this.maxWrap = maxWrap;
+ }
+
+ public int getMinWrap() {
+ return minWrap;
+ }
+
+ public int getMaxWrap() {
+ return maxWrap;
+ }
+
+ /**
+ * Wraps given {@code input} text accoding to
+ *
+ * @param input input text
+ * @param delimiter delimiter when inserting soft wraps
+ * @return modified text with added soft wraps, or input if wraps are not needed
+ */
+ public String wrap(String input, String delimiter) {
+ if (input.length() <= minWrap) {
+ return input;
+ }
+ wordCursor.setText(input);
+ charCursor.setText(input);
+ int pos = 0;
+ StringBuilder sb = new StringBuilder(input.length() + input.length() / minWrap * delimiter.length());
+ boolean hasChanges = false;
+ int nextLineSeparator = BreakCursor.UNINITIALIZED;
+ // Wrap long lines
+ while (input.length() - pos > maxWrap) {
+ if (nextLineSeparator != BreakIterator.DONE && nextLineSeparator < pos) {
+ nextLineSeparator = input.indexOf('\n', pos);
+ }
+ // Try adding the next line if it does not exceed maxWrap
+ int next = nextLineSeparator;
+ if (next != -1 && pos - next <= maxWrap) {
+ // The existing lines do not exceed maxWrap, just reuse them
+ next++; // include newline
+ sb.append(input, pos, next);
+ pos = next;
+ continue;
+ }
+ int startWrap = pos + minWrap - 1;
+ int endWrap = pos + maxWrap;
+ // Try breaking on word boundaries first
+ if (wordCursor.advance(startWrap, endWrap)) {
+ next = wordCursor.getPos();
+ } else {
+ // If char advances at least once, add it with the break even if it exceeds maxWrap
+ // Note: single "char break" might consume multiple Java chars in case like emojis.
+ charCursor.advance(startWrap, endWrap);
+ next = charCursor.getPos();
+ if (next == BreakIterator.DONE || next == input.length()) {
+ break;
+ }
+ }
+ sb.append(input, pos, next);
+ sb.append(delimiter);
+ hasChanges = true;
+ pos = next;
+ }
+ // Free up the memory
+ wordCursor.setText("");
+ charCursor.setText("");
+ if (!hasChanges) {
+ return input;
+ }
+ if (pos != input.length()) {
+ sb.append(input, pos, input.length());
+ }
+ return sb.toString();
+ }
+}
diff --git a/src/jorphan/src/test/java/org/apache/jorphan/util/StringWrapTest.java b/src/jorphan/src/test/java/org/apache/jorphan/util/StringWrapTest.java
new file mode 100644
index 00000000000..12b19e3809b
--- /dev/null
+++ b/src/jorphan/src/test/java/org/apache/jorphan/util/StringWrapTest.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jorphan.util;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.params.provider.Arguments.arguments;
+
+import java.util.stream.Stream;
+
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+public class StringWrapTest {
+ static Stream data() {
+ return Stream.of(
+ arguments(2, 2, "0123456789", "01|23|45|67|89"),
+ arguments(2, 5, "0123456789", "01234|56789"),
+ arguments(3, 3, "0123456789", "012|345|678|9"),
+ arguments(2, 5, "01-2-3-4-56-789-", "01-2-|3-4-|56-|789-"),
+ arguments(2, 5, "012\n345\n6\n7\n8\n9", null),
+ arguments(2, 5, "012\n3456789", "012\n34567|89"),
+ // Single-char symbols
+ arguments(2, 5, "丈丈丈丈丈a丈丈a 丈丈丈 b 丈丈", "丈丈丈丈丈|a丈丈a |丈丈丈 |b 丈丈"),
+ // Two-char symbols
+ arguments(2, 5, "निनिनिनिनिनिनdनिनिनिनि3निनिनिनिनिनि1 नि", "निनि|निनि|निनिन|dनिनि|निनि3|निनि|निनि|निनि1| नि"),
+ // Two-char symbols
+ arguments(2, 5, "😃😃😃😃😃😃😃😃a😃aa😃😃 😃😃 b 😃", "😃😃|😃😃|😃😃|😃😃a|😃aa|😃😃 |😃😃 |b 😃"),
+ arguments(1, 1, "😃", null),
+ // Multi-char symbols
+ arguments(2, 5, "rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆rè̑ͧ", "rè̑ͧ̌|aͨ|l̘̝̙̃ͤ͂̾̆|r|è̑ͧ̌|aͨ|l̘̝̙̃ͤ͂̾̆|rè̑ͧ"),
+ arguments(2, 9, "rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆rè̑ͧ", "rè̑ͧ̌aͨ|l̘̝̙̃ͤ͂̾̆|rè̑ͧ̌aͨ|l̘̝̙̃ͤ͂̾̆|rè̑ͧ")
+ );
+ }
+
+ @ParameterizedTest
+ @MethodSource("data")
+ void wrap(int minWrap, int maxWrap, String input, String expected) {
+ if (expected == null) {
+ expected = input;
+ }
+ StringWrap stringWrap = new StringWrap(minWrap, maxWrap);
+ String output = stringWrap.wrap(input, "|");
+ assertEquals(expected, output, () -> "minWrap=" + minWrap + ", maxWrap=" + maxWrap + ", input=" + input);
+ }
+}
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 2f86ec86bde..1666936dc13 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -143,6 +143,7 @@ however, the profile can't be updated while the test is running.
61805663Add simple HTTP request template. Contributed by Ori Marko (orimarko at gmail.com)
65611673Add support for IPv6 addresses when specifying a remote worker node. Based on a patch by Peter Wong (peter.wong at csexperts.com)
Reduce memory consumption by the logging panel (disable undo events for it)
+
63620694Fix GUI freeze when viewing response body with long line breaks
Non-functional changes
diff --git a/xdocs/usermanual/properties_reference.xml b/xdocs/usermanual/properties_reference.xml
index e373627838d..c4452ecfe26 100644
--- a/xdocs/usermanual/properties_reference.xml
+++ b/xdocs/usermanual/properties_reference.xml
@@ -1510,6 +1510,18 @@ JMETER-SERVER
Set to zero to disable the size check and display the whole response.
Defaults to: 10485760
+
+ Maximum size (in characters) of the line in the displayed.
+ This property works around Bug 63620 since Swing hangs when displaying very long lines.
+ Set to zero to disable line wrapping.
+ Defaults to: 110000
+
+
+ Line size (in characters) to consider wrapping to make UI faster.
+ This property works around Bug 63620 since Swing hangs when displaying very long lines.
+ Set to zero to disable line wrapping.
+ Defaults to: view.results.tree.max_line_size / 1.1f
+
Order of Renderers in View Results Tree. Note full class names should be used for non JMeter core renderers
From d4f637130db35cec7993094357290236ffef4497 Mon Sep 17 00:00:00 2001
From: Vladimir Sitnikov
Date: Sun, 6 Feb 2022 13:38:49 +0300
Subject: [PATCH 043/736] [Bug 63620] Disable kerning when document lenght
exceeds 10K
The treshold can be configured via text.kerning.max_document_size
---
bin/jmeter.properties | 3 +
.../jmeter/visualizers/SamplerResultTab.java | 2 +
.../main/java/org/apache/jmeter/JMeter.java | 4 +
.../jorphan/gui/ui/KerningOptimizer.java | 200 ++++++++++++++++++
.../jorphan/gui/ui/TextAreaUIWithUndo.java | 1 +
xdocs/usermanual/properties_reference.xml | 4 +
6 files changed, 214 insertions(+)
create mode 100644 src/jorphan/src/main/java/org/apache/jorphan/gui/ui/KerningOptimizer.java
diff --git a/bin/jmeter.properties b/bin/jmeter.properties
index c77877efa6e..8996e4f185d 100644
--- a/bin/jmeter.properties
+++ b/bin/jmeter.properties
@@ -1201,6 +1201,9 @@ view.results.tree.renderers_order=.RenderAsText,.RenderAsRegexp,.RenderAsBoundar
# Set to 0 to disable the size check
#document.max_size=0
+# Configures the maximum document length for rendering with kerning enabled
+#text.kerning.max_document_size=10000
+
#JMS options
# Enable the following property to stop JMS Point-to-Point Sampler from using
# the properties java.naming.security.[principal|credentials] when creating the queue connection
diff --git a/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java b/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
index f6d17f6e2a9..5a9afe4fad2 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
@@ -61,6 +61,7 @@
import org.apache.jorphan.gui.GuiUtils;
import org.apache.jorphan.gui.ObjectTableModel;
import org.apache.jorphan.gui.RendererUtils;
+import org.apache.jorphan.gui.ui.KerningOptimizer;
import org.apache.jorphan.reflect.Functor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -693,6 +694,7 @@ protected void setTextOptimized(String data) {
} catch (BadLocationException ex) {
LOGGER.error("Error inserting text", ex);
}
+ KerningOptimizer.INSTANCE.configureKerning(results, document.getLength());
results.setDocument(document);
}
}
diff --git a/src/core/src/main/java/org/apache/jmeter/JMeter.java b/src/core/src/main/java/org/apache/jmeter/JMeter.java
index 83a62020036..e5dffc61a99 100644
--- a/src/core/src/main/java/org/apache/jmeter/JMeter.java
+++ b/src/core/src/main/java/org/apache/jmeter/JMeter.java
@@ -105,6 +105,7 @@
import org.apache.jorphan.collections.SearchByClass;
import org.apache.jorphan.gui.ComponentUtil;
import org.apache.jorphan.gui.JMeterUIDefaults;
+import org.apache.jorphan.gui.ui.KerningOptimizer;
import org.apache.jorphan.reflect.ClassTools;
import org.apache.jorphan.util.HeapDumper;
import org.apache.jorphan.util.JMeterException;
@@ -374,6 +375,9 @@ private void startGui(String testFile) {
System.out.println("Check : https://jmeter.apache.org/usermanual/best-practices.html");//NOSONAR
System.out.println("================================================================================");//NOSONAR
+ KerningOptimizer.INSTANCE.setMaxTextLengthWithKerning(
+ JMeterUtils.getPropDefault("text.kerning.max_document_size", 10000)
+ );
JMeterUIDefaults.INSTANCE.install();
String jMeterLaf = LookAndFeelCommand.getPreferredLafCommand();
diff --git a/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/KerningOptimizer.java b/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/KerningOptimizer.java
new file mode 100644
index 00000000000..a414cae47d5
--- /dev/null
+++ b/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/KerningOptimizer.java
@@ -0,0 +1,200 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jorphan.gui.ui;
+
+import java.awt.Font;
+import java.awt.font.TextAttribute;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.lang.ref.WeakReference;
+import java.util.Collections;
+
+import javax.swing.JComponent;
+import javax.swing.SwingUtilities;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.text.Document;
+import javax.swing.text.JTextComponent;
+
+import org.apiguardian.api.API;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Text rendering might be slow for long lines when kerning is enabled, so it is worth disabling kerning for long
+ * texts.
+ */
+@API(since = "5.5", status = API.Status.INTERNAL)
+public class KerningOptimizer {
+ private final static Logger log = LoggerFactory.getLogger(KerningOptimizer.class);
+
+ public static final KerningOptimizer INSTANCE = new KerningOptimizer();
+
+ private volatile int maxLengthWithKerning = 10000;
+
+ /**
+ * Cache to avoid repeated calls to {@link Font#getAttributes()} since it copies the map every time.
+ */
+ static class FontKerningCache {
+ private static final String CLIENT_PROPERTY_KEY = "[jmeter]FontKerningCache";
+ WeakReference font;
+ boolean kerning;
+
+ static Boolean kerningOf(JComponent component) {
+ Font font = component.getFont();
+ if (font == null) {
+ return null;
+ }
+ if (!font.hasLayoutAttributes()) {
+ return false;
+ }
+ FontKerningCache cache = (FontKerningCache) component.getClientProperty(CLIENT_PROPERTY_KEY);
+ if (cache == null) {
+ cache = new FontKerningCache();
+ component.putClientProperty(CLIENT_PROPERTY_KEY, cache);
+ }
+ if (cache.font == null || !font.equals(cache.font.get())) {
+ cache.font = new WeakReference<>(font);
+ cache.kerning = TextAttribute.KERNING_ON.equals(font.getAttributes().get(TextAttribute.KERNING));
+ }
+ return cache.kerning;
+ }
+ }
+
+ /**
+ * Configures the maximum document length for rendering with kerning enabled.
+ *
+ * @param length maximum document length for rendering with kerning enabled
+ */
+ public void setMaxTextLengthWithKerning(int length) {
+ maxLengthWithKerning = length;
+ }
+
+ public int getMaxTextLengthWithKerning() {
+ return maxLengthWithKerning;
+ }
+
+ /**
+ * Configures text kerning according to the expected document length. This might be useful before setting the
+ * document so the kerning is disabled before updating the document.
+ *
+ * @param component text component for kerning configuration
+ * @param documentLength expected document length
+ */
+ public void configureKerning(JComponent component, int documentLength) {
+ Boolean kerning = FontKerningCache.kerningOf(component);
+ if (kerning == null) {
+ return;
+ }
+ boolean desiredKerning = documentLength <= maxLengthWithKerning;
+ if (kerning != desiredKerning) {
+ if (log.isDebugEnabled()) {
+ log.info("Updating kerning (old: {}, new: {}), documentLength={}, component {}, ", kerning, desiredKerning, documentLength, component);
+ }
+ Font font = component.getFont();
+ Font newFont = font.deriveFont(Collections.singletonMap(TextAttribute.KERNING, desiredKerning ? TextAttribute.KERNING_ON : 0));
+ SwingUtilities.invokeLater(() -> component.setFont(newFont));
+ }
+ }
+
+ /**
+ * Adds a listener that disables kerning if text length reaches a certain threshold.
+ *
+ * @param textComponent text component for kerning configuration
+ */
+ public void installKerningListener(JTextComponent textComponent) {
+ log.debug("Installing KerningOptimizer {} to {}", this, textComponent);
+ textComponent.addPropertyChangeListener("document", new DisableKerningForLargeTexts(textComponent));
+ }
+
+ /**
+ * Removes the listener that disables kerning if text length reaches a certain threshold.
+ *
+ * @param textComponent text component for kerning configuration
+ */
+ public void uninstallKerningListener(JTextComponent textComponent) {
+ DisableKerningForLargeTexts kerningListener = null;
+ for (PropertyChangeListener listener : textComponent.getPropertyChangeListeners("document")) {
+ if (listener instanceof DisableKerningForLargeTexts) {
+ kerningListener = (DisableKerningForLargeTexts) listener;
+ }
+ }
+ if (kerningListener == null) {
+ return;
+ }
+ log.debug("Uninstalling KerningOptimizer {} from {}", this, textComponent);
+ Document document = textComponent.getDocument();
+ if (document != null) {
+ document.removeDocumentListener(kerningListener);
+ }
+ textComponent.removePropertyChangeListener("document", kerningListener);
+ }
+
+ static class DisableKerningForLargeTexts implements PropertyChangeListener, DocumentListener {
+ final JTextComponent component;
+
+ DisableKerningForLargeTexts(JTextComponent component) {
+ this.component = component;
+ }
+
+ private void configureKerning(Document e) {
+ // RSyntaxTextArea and other implementations do not expect setFont called from document change listeners
+ // It looks like invokeLater fixes that
+ Boolean kerning = FontKerningCache.kerningOf(component);
+ if (kerning == null) {
+ return;
+ }
+ boolean desiredKerning = e.getLength() <= INSTANCE.getMaxTextLengthWithKerning();
+ if (kerning != desiredKerning) {
+ SwingUtilities.invokeLater(() -> INSTANCE.configureKerning(component, e.getLength()));
+ }
+ }
+
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (!"document".equals(evt.getPropertyName())) {
+ return;
+ }
+ Document oldDocument = (Document) evt.getOldValue();
+ if (oldDocument != null) {
+ oldDocument.removeDocumentListener(this);
+ }
+ Document newDocument = (Document) evt.getNewValue();
+ if (newDocument != null) {
+ newDocument.addDocumentListener(this);
+ configureKerning(newDocument);
+ }
+ }
+
+
+ @Override
+ public void insertUpdate(DocumentEvent e) {
+ configureKerning(e.getDocument());
+ }
+
+ @Override
+ public void removeUpdate(DocumentEvent e) {
+ configureKerning(e.getDocument());
+ }
+
+ @Override
+ public void changedUpdate(DocumentEvent e) {
+ configureKerning(e.getDocument());
+ }
+ }
+}
diff --git a/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/TextAreaUIWithUndo.java b/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/TextAreaUIWithUndo.java
index 75dd190a058..8cc94e061f6 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/TextAreaUIWithUndo.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/gui/ui/TextAreaUIWithUndo.java
@@ -60,6 +60,7 @@ public static void install(UIDefaults defaults) {
*/
@SuppressWarnings("unused")
public static ComponentUI createUI(JComponent component) {
+ KerningOptimizer.INSTANCE.installKerningListener((JTextComponent) component);
TextComponentUI.INSTANCE.installUndo((JTextComponent) component);
if (component.getClass() == JTextArea.class) {
component.addPropertyChangeListener("UI",
diff --git a/xdocs/usermanual/properties_reference.xml b/xdocs/usermanual/properties_reference.xml
index c4452ecfe26..fb53cd2e1e2 100644
--- a/xdocs/usermanual/properties_reference.xml
+++ b/xdocs/usermanual/properties_reference.xml
@@ -1535,6 +1535,10 @@ JMETER-SERVER
Set to zero to disable the size check.
Defaults to: 10485760
+
+ Configures the maximum document length for rendering with kerning enabled.
+ Defaults to: 10000
+
JMS options.
Enable the following property to stop JMS Point-to-Point Sampler from using
From 8546e2372ac08eecc27f56a5bfc24a6c4ecc7135 Mon Sep 17 00:00:00 2001
From: pmouawad
Date: Tue, 15 Feb 2022 23:09:16 +0100
Subject: [PATCH 044/736] Bug 65885 - HTML Report: Error report displays wrong
failure message when Response Assertion checks Ignore Status and response
code is not 200
---
.../report/processor/ErrorsSummaryConsumer.java | 9 ++++++---
.../report/processor/ErrorsSummaryConsumerTest.java | 13 +++++++++++--
xdocs/changes.xml | 1 +
3 files changed, 18 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 f0175730aaf..3b8d3b5ae92 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
@@ -88,17 +88,20 @@ protected String getKeyFromSample(Sample sample) {
* @return String Error key for sample
*/
static String getErrorKey(Sample sample) {
+ if (sample.getSuccess()) {
+ return "";
+ }
String responseCode = sample.getResponseCode();
String responseMessage = sample.getResponseMessage();
String key = responseCode + (!StringUtils.isEmpty(responseMessage) ?
"/" + escapeJson(responseMessage) : "");
+
if (MetricUtils.isSuccessCode(responseCode) ||
- (StringUtils.isEmpty(responseCode) &&
- !StringUtils.isEmpty(sample.getFailureMessage()))) {
+ StringUtils.isNotBlank(sample.getFailureMessage())) {
key = MetricUtils.ASSERTION_FAILED;
if (ASSERTION_RESULTS_FAILURE_MESSAGE) {
String msg = sample.getFailureMessage();
- if (!StringUtils.isEmpty(msg)) {
+ if (StringUtils.isNotBlank(msg)) {
key = escapeJson(msg);
}
}
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 ab43b8e964f..9a41be978e4 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
@@ -38,6 +38,9 @@ public void testGetErrorKey() {
sample = new Sample(0, metadata, new String[] { "false", "200", "", "FailureMessage" });
assertEquals("FailureMessage", ErrorsSummaryConsumer.getErrorKey(sample));
+ sample = new Sample(0, metadata, new String[] { "false", "200", "", "" });
+ assertEquals(MetricUtils.ASSERTION_FAILED, ErrorsSummaryConsumer.getErrorKey(sample));
+
sample = new Sample(0, metadata, new String[] { "false", "200", "",
"Test failed: text expected to contain /Some html text/" });
assertEquals("Test failed: text expected to contain /<title>Some html text</title>/",
@@ -49,9 +52,15 @@ public void testGetErrorKey() {
ErrorsSummaryConsumer.getErrorKey(sample));
sample = new Sample(0, metadata, new String[] { "true", "200", "", "" });
- assertEquals(MetricUtils.ASSERTION_FAILED, ErrorsSummaryConsumer.getErrorKey(sample));
+ assertEquals("", ErrorsSummaryConsumer.getErrorKey(sample));
+
+ 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", "FailureMessage" });
+ 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 1666936dc13..ced05b19f21 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -136,6 +136,7 @@ however, the profile can't be updated while the test is running.
Report / Dashboard
65353Make the estimator used for calculating percentiles on the dashboard configurable
+
65885HTML Report: Error report displays wrong failure message when Response Assertion checks Ignore Status and response code is not 200
General
From efe50ca5b150cdbdb578886f8b4d98d3f1ea264f Mon Sep 17 00:00:00 2001
From: sseide
Date: Wed, 16 Feb 2022 13:39:36 +0100
Subject: [PATCH 045/736] update tika-parsers to 1.28.1 (from 1.28) and
xstreams to 1.4.19 (from 1.4.18) (#698)
* update tika-parsers to 1.28.1 (from 1.28) and xstreams to 1.4.19 (from 1.4.18)
* update xercesImpl to 2.12.2 (from 2.12.1) and add new gpg key from xerces maintainer (ref XERCESJ-1735)
* add pr number to changes.xml
* update expected_release_jars.csv
---
checksum.xml | 1 +
gradle.properties | 6 +++---
src/dist/src/dist/expected_release_jars.csv | 8 ++++----
xdocs/changes.xml | 7 +++----
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/checksum.xml b/checksum.xml
index c335c72277a..c860213a819 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -198,6 +198,7 @@
+
diff --git a/gradle.properties b/gradle.properties
index 23207fddbef..376c3298fd6 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -132,12 +132,12 @@ slf4j.version=1.7.32
spock-core.version=2.0-M2-groovy-3.0
springframework.version=4.3.17.RELEASE
svgSalamander.version=1.1.2.4
-tika.version=1.28
+tika.version=1.28.1
xalan.version=2.7.2
-xercesImpl.version=2.12.1
+xercesImpl.version=2.12.2
xml-apis.version=1.4.01
xmlgraphics-commons.version=2.6
xmlpull.version=1.1.3.1
xpp3_min.version=1.1.4c
-xstream.version=1.4.18
+xstream.version=1.4.19
wiremock-jre8.version=2.30.0
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index a43c8d348bf..9caa9b8281f 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -121,13 +121,13 @@
301279,svgSalamander-1.1.2.4.jar
10192,swing-extensions-laf-support-0.1.3.jar
2539,swing-extensions-visual-padding-0.1.3.jar
-735635,tika-core-1.28.jar
-1585374,tika-parsers-1.28.jar
+735645,tika-core-1.28.1.jar
+1585382,tika-parsers-1.28.1.jar
174661,vis-svg-portable-jvm-2.2.1.jar
3154938,xalan-2.7.2.jar
-1386502,xercesImpl-2.12.1.jar
+1446149,xercesImpl-2.12.2.jar
220536,xml-apis-1.4.01.jar
85686,xml-apis-ext-1.3.04.jar
674607,xmlgraphics-commons-2.6.jar
7188,xmlpull-1.1.3.1.jar
-629707,xstream-1.4.18.jar
+633140,xstream-1.4.19.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index ced05b19f21..44a09ceef70 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -152,7 +152,7 @@ however, the profile can't be updated while the test is running.
Added Kotlin 1.6.0 for JMeter engine implementation (apiVersion=1.5). The set of JSR 223 languages is intact.
65128643Add missing documentation about Same user on each iteration for Thread Groups. Contributed by njkuzas.
648Updated xmlgraphics-commons to 2.6 (from 2.3). Contributed by Stefan Seide (stefan at trilobyte-se.de)
-
655667675Updated x-stream to 1.4.18 (from 1.4.15). Contributed by Stefan Seide (stefan at trilobyte-se.de)
+
655667675698Updated x-stream to 1.4.19 (from 1.4.15). Contributed by Stefan Seide (stefan at trilobyte-se.de)
656668Updated json-smart to 2.4.7 (from 2.3), accessors-smart to 2.4.7 (from 1.2) and asm 9.1 (from 9.0). Contributed by Stefan Seide (stefan at trilobyte-se.de)
64831Log truststore entries in debug level for logger org.apache.jmeter.util.keystore.JmeterKeyStore
65232Hide splash screen when an error is displayed because the test plan could not be parsed.
@@ -185,7 +185,7 @@ however, the profile can't be updated while the test is running.
65128643Add missing documentation about Same user on each iteration for Thread Groups. Contributed by njkuzas.
648Updated xmlgraphics-commons to 2.6 (from 2.3). Contributed by Stefan Seide (stefan at trilobyte-se.de)
655667675698Updated x-stream to 1.4.19 (from 1.4.15). Contributed by Stefan Seide (stefan at trilobyte-se.de)
-
656668Updated json-smart to 2.4.7 (from 2.3), accessors-smart to 2.4.7 (from 1.2) and asm 9.1 (from 9.0). Contributed by Stefan Seide (stefan at trilobyte-se.de)
+
656668Updated json-smart to 2.4.8 (from 2.3), accessors-smart to 2.4.8 (from 1.2) and asm 9.1 (from 9.0). Contributed by Stefan Seide (stefan at trilobyte-se.de)
64831Log truststore entries in debug level for logger org.apache.jmeter.util.keystore.JmeterKeyStore
65232Hide splash screen when an error is displayed because the test plan could not be parsed.
Updated Groovy to 3.0.9 (from 3.0.7).
From d5640f7169a80c287d596e5b07ea215cb040df14 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 10:48:50 +0100
Subject: [PATCH 052/736] Update ActiveMQ to 5.16.4
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index d8d1cfa04eb..f111edf9748 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -57,7 +57,7 @@ org.sonarqube.version=3.0
# Dependencies
accessors-smart.version=2.4.8
-activemq.version=5.16.2
+activemq.version=5.16.4
apache-rat.version=0.13
apiguardian-api.version=1.1.0
asm.version=9.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 28ed31160ac..81bd4da610f 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -158,7 +158,7 @@ however, the profile can't be updated while the test is running.
65232Hide splash screen when an error is displayed because the test plan could not be parsed.
Updated Groovy to 3.0.9 (from 3.0.7).
Updated Darklaf to 2.7.3 (from 2.5.4).
-
Updated Apache ActiveMQ to 15.6.2 (from 15.6.0).
+
Updated Apache ActiveMQ to 15.6.4 (from 15.6.0).
Updated Asm to 9.2 (from 9.1).
Updated Bouncycastle to 1.69 (from 1.67).
Updated Caffeine to 2.9.2 (from 2.8.8).
From 19fdf6a45721e3983431aaa850c776a176b1d90f Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:00:25 +0100
Subject: [PATCH 053/736] Add checksum of key for xbean
---
checksum.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/checksum.xml b/checksum.xml
index af317ecd33a..68e7a0920e9 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -132,6 +132,7 @@
+
From 75d5ad688fabd35dcac8b9538b8604e145bbf802 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:08:10 +0100
Subject: [PATCH 054/736] Updated Caffeine to 2.9.3
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index f111edf9748..72c4d9a06a8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -64,7 +64,7 @@ asm.version=9.2
bouncycastle.version=1.69
bsf.version=2.4.0
bsh.version=2.0b6
-caffeine.version=2.9.2
+caffeine.version=2.9.3
cglib-nodep.version=3.2.12
commons-codec.version=1.15
commons-collections.version=3.2.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 81bd4da610f..04522e7db83 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -161,7 +161,7 @@ however, the profile can't be updated while the test is running.
Updated Apache ActiveMQ to 15.6.4 (from 15.6.0).
Updated Asm to 9.2 (from 9.1).
Updated Bouncycastle to 1.69 (from 1.67).
-
Updated Caffeine to 2.9.2 (from 2.8.8).
+
Updated Caffeine to 2.9.3 (from 2.8.8).
Updated Apache commons-dbcp2 to 2.9.0 (from 2.8.0).
Updated Apache commons-io to 2.11.0 (from 2.8.0).
Updated Apache commons-lang3 to 3.12.0 (from 3.11).
From 1228254494a09a0aec93bc83bd51ce712f789cfb Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:15:54 +0100
Subject: [PATCH 055/736] Updated commons-pool2 to 2.11.1
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 72c4d9a06a8..33b83262b08 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -78,7 +78,7 @@ commons-lang3.version=3.12.0
commons-logging.version=1.2
commons-math3.version=3.6.1
commons-net.version=3.8.0
-commons-pool2.version=2.11.0
+commons-pool2.version=2.11.1
commons-text.version=1.9
darklaf.version=2.7.3
darklaf.extensions.version=0.3.4
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 04522e7db83..7cc6a07ee43 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -166,7 +166,7 @@ however, the profile can't be updated while the test is running.
Updated Apache commons-io to 2.11.0 (from 2.8.0).
Updated Apache commons-lang3 to 3.12.0 (from 3.11).
Updated Apache commons-net to 3.8.0 (from 3.7.2).
-
Updated Apache commons-pool2 to 2.11.0 (from 2.9.0).
+
Updated Apache commons-pool2 to 2.11.1 (from 2.9.0).
Updated equalsverifier to 3.7 (from 3.4.2).
Updated Apache Freemarker to 2.3.31 (from 2.3.30).
Updated hsqldb to 2.6.0 (from 2.5.0).
From 1c325d6309bba2f69a36404f973610403a9ab91b Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:20:21 +0100
Subject: [PATCH 056/736] Updates equalsverifier to 3.9
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 33b83262b08..ba601cb6422 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -84,7 +84,7 @@ darklaf.version=2.7.3
darklaf.extensions.version=0.3.4
dec.version=0.1.2
dnsjava.version=2.1.9
-equalsverifier.version=3.7
+equalsverifier.version=3.9
freemarker.version=2.3.31
ftplet-api.version=1.1.1
ftpserver-core.version=1.1.1
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 7cc6a07ee43..6bebedb2e50 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -167,7 +167,7 @@ however, the profile can't be updated while the test is running.
Updated Apache commons-lang3 to 3.12.0 (from 3.11).
Updated Apache commons-net to 3.8.0 (from 3.7.2).
Updated Apache commons-pool2 to 2.11.1 (from 2.9.0).
-
Updated equalsverifier to 3.7 (from 3.4.2).
+
Updated equalsverifier to 3.9 (from 3.4.2).
Updated Apache Freemarker to 2.3.31 (from 2.3.30).
Updated hsqldb to 2.6.0 (from 2.5.0).
Updated Apache HttpClient to 4.5.13 (from 4.5.12).
From 1d164f744cf53b843a8c04eee27d5c6c2ef42fd1 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:23:59 +0100
Subject: [PATCH 057/736] Updated ftplet and ftpserver to 1.1.3
---
gradle.properties | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index ba601cb6422..e915fe4cb66 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -86,8 +86,8 @@ dec.version=0.1.2
dnsjava.version=2.1.9
equalsverifier.version=3.9
freemarker.version=2.3.31
-ftplet-api.version=1.1.1
-ftpserver-core.version=1.1.1
+ftplet-api.version=1.1.3
+ftpserver-core.version=1.1.3
geronimo-jms_1.1_spec.version=1.1.1
groovy.version=3.0.9
hamcrest.version=2.2
From ee6d4f06c92de7e4d18b12d83b965d9a407a8d10 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:25:35 +0100
Subject: [PATCH 058/736] Updated hamcrest-date to 2.0.8
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle.properties b/gradle.properties
index e915fe4cb66..10031536bbe 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -91,7 +91,7 @@ ftpserver-core.version=1.1.3
geronimo-jms_1.1_spec.version=1.1.1
groovy.version=3.0.9
hamcrest.version=2.2
-hamcrest-date.version=2.0.7
+hamcrest-date.version=2.0.8
hsqldb.version=2.5.2
httpasyncclient.version=4.1.4
httpclient.version=4.5.13
From b4c9e671550ae792ff62b13b0a910af67e7e20f0 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:27:09 +0100
Subject: [PATCH 059/736] Updated hsqldb to 2.6.1
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle.properties b/gradle.properties
index 10031536bbe..4b92e98b015 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -92,7 +92,7 @@ geronimo-jms_1.1_spec.version=1.1.1
groovy.version=3.0.9
hamcrest.version=2.2
hamcrest-date.version=2.0.8
-hsqldb.version=2.5.2
+hsqldb.version=2.6.1
httpasyncclient.version=4.1.4
httpclient.version=4.5.13
httpcore-nio.version=4.4.14
From 0d04f1379ed7d7a7ad6999bf69a60d0758030039 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:32:26 +0100
Subject: [PATCH 060/736] Bytebuddy used by Caffeine
---
checksum.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/checksum.xml b/checksum.xml
index 68e7a0920e9..096e3d67e4e 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -93,6 +93,7 @@
+
From bcf2c29225abfd05ef7b8b0b43e5966ec7a90f9f Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 11:36:18 +0100
Subject: [PATCH 061/736] Updated Apache HttpCore to 4.4.15
---
gradle.properties | 6 +++---
xdocs/changes.xml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 4b92e98b015..c30380cecd7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -93,10 +93,10 @@ groovy.version=3.0.9
hamcrest.version=2.2
hamcrest-date.version=2.0.8
hsqldb.version=2.6.1
-httpasyncclient.version=4.1.4
+httpasyncclient.version=4.1.5
httpclient.version=4.5.13
-httpcore-nio.version=4.4.14
-httpcore.version=4.4.14
+httpcore-nio.version=4.4.15
+httpcore.version=4.4.15
httpmime.version=4.5.13
jackson.version=2.13.1
jackson-databind.version=2.13.1
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 6bebedb2e50..f17be2e8619 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -171,7 +171,7 @@ however, the profile can't be updated while the test is running.
Updated Apache Freemarker to 2.3.31 (from 2.3.30).
Updated hsqldb to 2.6.0 (from 2.5.0).
Updated Apache HttpClient to 4.5.13 (from 4.5.12).
-
Updated Apache HttpCore to 4.4.14 (from 4.4.13).
+
Updated Apache HttpCore to 4.4.15 (from 4.4.13).
Updated jacoco to 0.8.7 (from 0.8.5).
Updated json-path to 2.6.0 (from 2.4.0).
Updated jsoup to 1.14.3 (from 1.13.1).
From 1564774137506e6eb8283f384324bd51306ca1c1 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 12:17:01 +0100
Subject: [PATCH 062/736] Update JMESPath to 0.5.1
---
gradle.properties | 4 ++--
xdocs/changes.xml | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index c30380cecd7..d08905ec9ec 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -104,8 +104,8 @@ javax.activation.version=1.2.0
jcharts.version=0.7.5
jdom.version=1.1.3
jetbrains-annotations.version=23.0.0
-jmespath-core.version=0.5.0
-jmespath-jackson.version=0.5.0
+jmespath-core.version=0.5.1
+jmespath-jackson.version=0.5.1
jodd.version=5.0.13
json-path.version=2.6.0
json-smart.version=2.4.8
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index f17be2e8619..0dd8dfe65de 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -189,6 +189,7 @@ however, the profile can't be updated while the test is running.
671Move example definition of property jmeter.reportgenerator.statistic_window
to user.properties, as it is read from that place.
Contributed by Rithvik Patibandla (rithvikp98 at gmail.com)
From b93413802408a6d66bc3adbf080ed5edce0dc749 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 12:29:57 +0100
Subject: [PATCH 063/736] Reverted Update of hsqldb to 2.6.1 (the binary seems
to be compiled with Java >8)
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index d08905ec9ec..77db8847699 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -92,7 +92,7 @@ geronimo-jms_1.1_spec.version=1.1.1
groovy.version=3.0.9
hamcrest.version=2.2
hamcrest-date.version=2.0.8
-hsqldb.version=2.6.1
+hsqldb.version=2.5.2
httpasyncclient.version=4.1.5
httpclient.version=4.5.13
httpcore-nio.version=4.4.15
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 0dd8dfe65de..9d88b651c2d 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -169,7 +169,7 @@ however, the profile can't be updated while the test is running.
Updated Apache commons-pool2 to 2.11.1 (from 2.9.0).
Updated equalsverifier to 3.9 (from 3.4.2).
Updated Apache Freemarker to 2.3.31 (from 2.3.30).
-
Updated hsqldb to 2.6.0 (from 2.5.0).
+
Updated hsqldb to 2.5.2 (from 2.5.0).
Updated Apache HttpClient to 4.5.13 (from 4.5.12).
Updated Apache HttpCore to 4.4.15 (from 4.4.13).
Updated jacoco to 0.8.7 (from 0.8.5).
From 339d66fed0523d7229444a773d94f4e22f48fd1d Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 12:40:43 +0100
Subject: [PATCH 064/736] Updated JUnit5 to 5.8.2
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 77db8847699..ca61c5681be 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -112,7 +112,7 @@ json-smart.version=2.4.8
jsoup.version=1.14.3
jtidy.version=r938
junit4.version=4.13.2
-junit5.version=5.8.1
+junit5.version=5.8.2
lets-plot-batik.version=2.2.1
lets-plot-kotlin-jvm.version=3.1.1
log4j.version=2.17.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 9d88b651c2d..73639a1363e 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -175,7 +175,7 @@ however, the profile can't be updated while the test is running.
Updated jacoco to 0.8.7 (from 0.8.5).
Updated json-path to 2.6.0 (from 2.4.0).
Updated jsoup to 1.14.3 (from 1.13.1).
-
Updated JUnit to 4.13.2 and 5.8.1 (from 4.13.1 and 5.7.0).
+
Updated JUnit to 4.13.2 and 5.8.2 (from 4.13.1 and 5.7.0).
Updated Apache log4j2 to 2.17.2 (from 2.13.3).
Updated Miglayout to 5.3 (from 5.2).
Updated Neo4j Java driver to 4.3.3 (from 4.2.0).
From 7c161a2d3c041fd5fd149a1b555a2b5e97878a44 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 12:55:02 +0100
Subject: [PATCH 065/736] Updated mina-core to 2.1.6
It was already used in this version by dependency
---
gradle.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gradle.properties b/gradle.properties
index ca61c5681be..1e3d3121a4b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -118,7 +118,7 @@ lets-plot-kotlin-jvm.version=3.1.1
log4j.version=2.17.2
mail.version=1.5.0-b01
miglayout.version=5.3
-mina-core.version=2.0.19
+mina-core.version=2.1.6
mongo-java-driver.version=2.11.3
neo4j-java-driver.version=4.3.3
objenesis.version=3.2
From de94417d5d0347d8f6d80d532185498a609c201d Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 13:02:18 +0100
Subject: [PATCH 066/736] Updated Neo4j Java driver to 4.4.4
---
gradle.properties | 2 +-
xdocs/changes.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 1e3d3121a4b..03de6e67c00 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -120,7 +120,7 @@ mail.version=1.5.0-b01
miglayout.version=5.3
mina-core.version=2.1.6
mongo-java-driver.version=2.11.3
-neo4j-java-driver.version=4.3.3
+neo4j-java-driver.version=4.4.3
objenesis.version=3.2
oro.version=2.0.8
ph-commons.version=10.1.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 73639a1363e..18c7657ef56 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -178,7 +178,7 @@ however, the profile can't be updated while the test is running.
Updated JUnit to 4.13.2 and 5.8.2 (from 4.13.1 and 5.7.0).
Updated Apache log4j2 to 2.17.2 (from 2.13.3).
Updated Miglayout to 5.3 (from 5.2).
-
Updated Neo4j Java driver to 4.3.3 (from 4.2.0).
+
Updated Neo4j Java driver to 4.4.4 (from 4.2.0).
Updated Objenesis to 3.2 (from 2.6).
Updated ktlint to 0.40.0
Updated PH CSS and PH commons to 6.3.4 and 9.5.5 (from 6.2.3 and 9.5.1).
From 1c605fd532692318179cac622e1f0fc78aad39fa Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 13:22:49 +0100
Subject: [PATCH 067/736] Updated PH CSS and PH commons to 6.5.4 and 10.1.6
---
gradle.properties | 4 ++--
xdocs/changes.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 03de6e67c00..b20ebe8371d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -123,8 +123,8 @@ mongo-java-driver.version=2.11.3
neo4j-java-driver.version=4.4.3
objenesis.version=3.2
oro.version=2.0.8
-ph-commons.version=10.1.2
-ph-css.version=6.3.4
+ph-commons.version=10.1.6
+ph-css.version=6.5.0
rhino.version=1.7.13
rsyntaxtextarea.version=3.1.3
Saxon-HE.version=9.9.1-8
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 18c7657ef56..9bb5ecbeec6 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -181,7 +181,7 @@ however, the profile can't be updated while the test is running.
Updated Neo4j Java driver to 4.4.4 (from 4.2.0).
Updated Objenesis to 3.2 (from 2.6).
Updated ktlint to 0.40.0
-
Updated PH CSS and PH commons to 6.3.4 and 9.5.5 (from 6.2.3 and 9.5.1).
+
Updated PH CSS and PH commons to 6.5.4 and 10.1.6 (from 6.2.3 and 9.5.1).
671Move example definition of property jmeter.reportgenerator.statistic_window
to user.properties, as it is read from that place.
Contributed by Rithvik Patibandla (rithvikp98 at gmail.com)
From 9980e47023041414a8194a8bf2c369f373b3d515 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 15:30:16 +0100
Subject: [PATCH 071/736] Updated SLF4J to 1.7.36
---
gradle.properties | 2 +-
src/dist/src/dist/expected_release_jars.csv | 4 ++--
xdocs/changes.xml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 75a7b000585..7d8e1e4420a 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -128,7 +128,7 @@ ph-css.version=6.5.0
rhino.version=1.7.13
rsyntaxtextarea.version=3.1.6
Saxon-HE.version=11.2
-slf4j.version=1.7.32
+slf4j.version=1.7.36
spock-core.version=2.0-M2-groovy-3.0
springframework.version=4.3.17.RELEASE
svgSalamander.version=1.1.2.4
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index 52a4c466637..daecdda5b1c 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -74,7 +74,7 @@
1534017,jackson-databind-2.13.1.jar
78030,javax.activation-1.2.0.jar
142391,jcharts-0.7.5.jar
-16630,jcl-over-slf4j-1.7.32.jar
+16555,jcl-over-slf4j-1.7.36.jar
490571,jmespath-core-0.5.1.jar
7066,jmespath-jackson-0.5.1.jar
403497,jodd-core-5.0.13.jar
@@ -117,7 +117,7 @@
1245900,rsyntaxtextarea-3.1.6.jar
5104409,Saxon-HE-11.2.jar
276420,serializer-2.7.2.jar
-41513,slf4j-api-1.7.32.jar
+41125,slf4j-api-1.7.36.jar
301279,svgSalamander-1.1.2.4.jar
10192,swing-extensions-laf-support-0.1.3.jar
2539,swing-extensions-visual-padding-0.1.3.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index d144e20aa0d..708209ee4db 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -183,7 +183,7 @@ however, the profile can't be updated while the test is running.
Updated ktlint to 0.40.0
Updated PH CSS and PH commons to 6.5.4 and 10.1.6 (from 6.2.3 and 9.5.1).
Updated RSyntaxTextArea to 3.1.6 (from 3.1.1).
-
Updated SLF4J to 1.7.32 (from 1.7.30).
+
Updated SLF4J to 1.7.36 (from 1.7.30).
Updated SvgSalamander to 1.1.2.4 (from 1.1.2.1).
698Updated Apache Tika to 1.28.1 (from 1.26).
Updated WireMock-JRE8 to 2.30.0 (from 2.24.1).
From a1e9ac7d15792800e39cb1a5307db31574e27b20 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 15:45:39 +0100
Subject: [PATCH 072/736] Update Apache xmlgraphics commons to 2.7
---
gradle.properties | 2 +-
src/dist/src/dist/expected_release_jars.csv | 2 +-
xdocs/changes.xml | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index 7d8e1e4420a..7668e03b0b3 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -136,7 +136,7 @@ tika.version=1.28.1
xalan.version=2.7.2
xercesImpl.version=2.12.2
xml-apis.version=1.4.01
-xmlgraphics-commons.version=2.6
+xmlgraphics-commons.version=2.7
xmlpull.version=1.1.3.1
xpp3_min.version=1.1.4c
xstream.version=1.4.19
diff --git a/src/dist/src/dist/expected_release_jars.csv b/src/dist/src/dist/expected_release_jars.csv
index daecdda5b1c..d627e3d9648 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -128,7 +128,7 @@
1446149,xercesImpl-2.12.2.jar
220536,xml-apis-1.4.01.jar
85686,xml-apis-ext-1.3.04.jar
-674607,xmlgraphics-commons-2.6.jar
+675889,xmlgraphics-commons-2.7.jar
7188,xmlpull-1.1.3.1.jar
1027759,xmlresolver-4.2.0-data.jar
150259,xmlresolver-4.2.0.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 708209ee4db..833fd2c63ba 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -191,6 +191,7 @@ however, the profile can't be updated while the test is running.
Updated jackson to 2.13.1 (from 2.10.5)
Updated jmespath to 0.5.1
Updated Saxon-HE to 11.2 (from 9.9.1-8)
+
Updated Apache xmlgraphics commons to 2.7 (from 2.6)
671Move example definition of property jmeter.reportgenerator.statistic_window
to user.properties, as it is read from that place.
Contributed by Rithvik Patibandla (rithvikp98 at gmail.com)
From c8a47113d5316ca5d835c102abb650523ae4e16d Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 15:54:50 +0100
Subject: [PATCH 073/736] Updated wiremock to 2.32.0
---
checksum.xml | 2 ++
gradle.properties | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/checksum.xml b/checksum.xml
index 03092002e70..4d4bd139588 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -125,6 +125,8 @@
+
+
diff --git a/gradle.properties b/gradle.properties
index 7668e03b0b3..2e58940a2bd 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -140,4 +140,4 @@ xmlgraphics-commons.version=2.7
xmlpull.version=1.1.3.1
xpp3_min.version=1.1.4c
xstream.version=1.4.19
-wiremock-jre8.version=2.30.0
+wiremock-jre8.version=2.32.0
From 0b34b4054a9674b6b37dc73f068421ebeda69235 Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 16:07:13 +0100
Subject: [PATCH 074/736] Update checkstyle to 9.3
The 10.x branch is Java 11 and higher, only.
Suppress UnnecessaryParentheses for now, as we have quite a few of those and
it seems to be new check.
---
checksum.xml | 4 ++++
config/checkstyle/checkstyle-suppressions.xml | 1 +
gradle.properties | 2 +-
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/checksum.xml b/checksum.xml
index 4d4bd139588..f0b151d7995 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -82,6 +82,7 @@
+
@@ -106,6 +107,7 @@
+
@@ -165,6 +167,7 @@
+
@@ -192,6 +195,7 @@
+
diff --git a/config/checkstyle/checkstyle-suppressions.xml b/config/checkstyle/checkstyle-suppressions.xml
index 87101fa1e2c..17e98efbfe3 100644
--- a/config/checkstyle/checkstyle-suppressions.xml
+++ b/config/checkstyle/checkstyle-suppressions.xml
@@ -28,4 +28,5 @@
files="test[\\/].*"/>
+
diff --git a/gradle.properties b/gradle.properties
index 2e58940a2bd..6caea8bcf3b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -32,7 +32,7 @@ kotlin.code.style=official
jmeter.version=5.5
# Tools
-checkstyle.version=8.35
+checkstyle.version=9.3
errorprone.version=2.10.0
jacoco.version=0.8.7
ktlint.version=0.40.0
From cc62ec4921c14d6397418cb766b96038e2bb99cd Mon Sep 17 00:00:00 2001
From: Felix Schumacher
Date: Sat, 5 Mar 2022 17:32:22 +0100
Subject: [PATCH 075/736] Add notice for mxparser to README.md
According to https://raw.githubusercontent.com/x-stream/mxparser/master/LICENSE.txt
we have to put such a notice somewhere in the documentation.
---
README.md | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/README.md b/README.md
index a5703ea1cce..1255834304f 100644
--- a/README.md
+++ b/README.md
@@ -266,3 +266,11 @@ Apache JMeter does not include any implementation of JSSE or JCE.
## Thanks
**Thank you for using Apache JMeter.**
+
+### Third party notices
+
+* Notice for mxparser:
+
+ > This product includes software developed by the Indiana
+ > University Extreme! Lab. For further information please visit
+ > http://www.extreme.indiana.edu/
From d8a169e10f5d79ec1ee24d665f961f5be1972aa9 Mon Sep 17 00:00:00 2001
From: "Y. Z. Chen" <754097987@qq.com>
Date: Sat, 5 Mar 2022 00:22:07 +0800
Subject: [PATCH 076/736] ci: use https://www.apache.org instead of
http://www.eu.apache.org for downloading Maven
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index e2f7c285a46..a10bff12ec7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -88,7 +88,7 @@ matrix:
arch: s390x
jdk: openjdk11
script:
- - wget http://www.eu.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
+ - wget https://www.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
- tar -xvzf apache-maven-3.6.3-bin.tar.gz
- export PATH=`pwd`/apache-maven-3.6.3/bin/:$PATH
- ./gradlew -PskipJavadoc publishToMavenLocal -Pjmeter.version=42.0 -PchecksumIgnore
From 2bb940e230531cd7f07b6e1932b36b54724af16e Mon Sep 17 00:00:00 2001
From: "Y. Z. Chen" <754097987@qq.com>
Date: Fri, 4 Mar 2022 08:12:54 +0800
Subject: [PATCH 077/736] (typo) in zh-CN translation.
---
.../org/apache/jmeter/resources/messages_zh_CN.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties b/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
index 2ff829e4626..9ae4dfaa350 100644
--- a/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
+++ b/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
@@ -759,7 +759,7 @@ web_testing_basic=基本
web_testing_concurrent_download=并行下载. 数量:
web_testing_embedded_url_pattern=网址必须匹配:
web_testing_retrieve_images=从HTML文件获取所有内含的资源
-web_testing_retrieve_title=从HMTL文件嵌入资源
+web_testing_retrieve_title=从HTML文件嵌入资源
web_testing_source_ip=源地址
web_testing_source_ip_device=设备
web_testing_source_ip_device_ipv4=设备 IPv4
From 5e92589b10480c136f279e52df6873b8190e5cc4 Mon Sep 17 00:00:00 2001
From: "C.C" <709787793@qq.com>
Date: Wed, 23 Feb 2022 17:24:34 +0800
Subject: [PATCH 078/736] Updated Chinese Simplified Translation
Kept the ordering of the original file and deleted those new entries from #701,
that can't be found in any other translation file or the sources.
Closes #701
---
.../resources/messages_zh_CN.properties | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties b/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
index 9ae4dfaa350..3ac59dd129f 100644
--- a/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
+++ b/src/core/src/main/resources/org/apache/jmeter/resources/messages_zh_CN.properties
@@ -21,7 +21,7 @@
#
# Please add new entries in alphabetical order
-about=关于Apache JMeter
+about=关于 Apache JMeter
action_check_message=测试当前正在运行,停止或关闭测试以执行此命令
action_check_title=测试运行中
active_total_threads_tooltip=运行中线程数/运行线程总数
@@ -35,7 +35,7 @@ add_pattern=添加模式:
add_test=添加测试
add_think_times=为子线程添加响应时间
add_user=添加用户
-add_value=添加数值
+add_value=添加值
addtest=添加测试
aggregate_graph=统计图表
aggregate_graph_choose_color=选择颜色
@@ -47,7 +47,7 @@ aggregate_graph_column_settings=列设置
aggregate_graph_columns_to_display=列显示:
aggregate_graph_dimension=图表大小
aggregate_graph_display=显示图表
-aggregate_graph_draw_outlines=画出轮廓?
+aggregate_graph_draw_outlines=绘制轮廓?
aggregate_graph_dynamic_size=动态图形大小
aggregate_graph_font=字体:
aggregate_graph_height=高度:
@@ -56,9 +56,9 @@ aggregate_graph_legend=图例
aggregate_graph_legend.placement.bottom=底部
aggregate_graph_legend.placement.left=左
aggregate_graph_legend.placement.right=右
-aggregate_graph_legend.placement.top=上
+aggregate_graph_legend.placement.top=顶部
aggregate_graph_legend_placement=放置:
-aggregate_graph_max_length_xaxis_label=X轴标签最大长度
+aggregate_graph_max_length_xaxis_label=X轴标签的最大长度
aggregate_graph_ms=毫秒
aggregate_graph_no_values_to_graph=没有要绘制的值
aggregate_graph_number_grouping=显示号码分组?
@@ -443,7 +443,7 @@ httpmirror_title=HTTP镜像服务器
id_prefix=ID前缀
id_suffix=ID后缀
if_controller_label=条件
-if_controller_title=如果(If)控制器
+if_controller_title=IF 控制器
ignore_subcontrollers=忽略子控制器块
include_controller=Include控制器
include_equals=包含等于?
@@ -574,7 +574,7 @@ post_as_parameters=参数
post_body=消息体数据
post_body_raw=消息体数据
post_files_upload=文件上传
-post_thread_group_title=tearDown线程组
+post_thread_group_title=tearDown 线程组
property_default_param=默认值
property_edit=编辑
property_editor.value_is_invalid_title=无效输入
@@ -637,7 +637,7 @@ sampler_on_error_start_next_loop=启动下一进程循环
sampler_on_error_stop_test=停止测试
sampler_on_error_stop_test_now=立即停止测试
sampler_on_error_stop_thread=停止线程
-save=保存测试计划
+save=保存
save?=保存?
save_all_as=保存测试计划为
save_as=选中部分保存为...
@@ -661,7 +661,7 @@ send_file_param_name_label=参数名称:
server=服务器名称或IP:
servername=服务器名称:
session_argument_name=会话参数名称:
-setup_thread_group_title=setUp线程组
+setup_thread_group_title=setUp 线程组
shutdown=关闭
simple_config_element=简单配置元件
simple_data_writer_title=简单数据写入器
@@ -695,7 +695,7 @@ tcp_port=端口号:
tcp_request_data=要发送的文本
tcp_sample_title=TCP取样器
tcp_timeout=超时:
-teardown_on_shutdown=主线程结束后运行 tearDown线程组
+teardown_on_shutdown=主线程结束后运行 tearDown 线程组
template_field=模板:
template_menu=模板...
test=测试
@@ -738,13 +738,13 @@ username=用户名
validate_threadgroup=验证
value=值
var_name=引用名称
-view_graph_tree_title=察看结果树
-view_results_in_table=用表格察看结果
+view_graph_tree_title=查看结果树
+view_results_in_table=用表格查看结果
view_results_tab_request=请求
view_results_tab_response=响应数据
view_results_tab_sampler=取样器结果
-view_results_title=察看结果
-view_results_tree_title=察看结果树
+view_results_title=查看结果
+view_results_tree_title=查看结果树
web_proxy_server_title=代理服务器
web_request=HTTP请求
web_server=Web服务器
From 4ea72b5028e3eeac531777496a3a6349064a9fe8 Mon Sep 17 00:00:00 2001
From: shblue21
Date: Mon, 21 Feb 2022 13:32:29 +0900
Subject: [PATCH 079/736] Write graphite guide in realtime section
write graphite setting, in realtime section,
with simple pickle protocol
Closes #699
---
xdocs/changes.xml | 2 ++
.../screenshots/backend_listener_graphite.png | Bin 0 -> 5760 bytes
.../backend_listener_graphite_pickle.png | Bin 0 -> 1929 bytes
xdocs/usermanual/realtime-results.xml | 16 ++++++++++++++--
4 files changed, 16 insertions(+), 2 deletions(-)
create mode 100644 xdocs/images/screenshots/backend_listener_graphite.png
create mode 100644 xdocs/images/screenshots/backend_listener_graphite_pickle.png
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 833fd2c63ba..f72c51cf411 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -145,6 +145,7 @@ however, the profile can't be updated while the test is running.
65611673Add support for IPv6 addresses when specifying a remote worker node. Based on a patch by Peter Wong (peter.wong at csexperts.com)
Reduce memory consumption by the logging panel (disable undo events for it)
63620694Fix GUI freeze when viewing response body with long line breaks
+
699Add documentation for Graphite Backend Listener. Contributed by Ji Hun (jihunkimkw at gmail.com)
Non-functional changes
@@ -304,6 +305,7 @@ however, the profile can't be updated while the test is running.
Magnus Spångdal (magnus.spangdal as avanza.se)
Piotr Smietana (piotrsmietana1998 at gmail.com)
Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
+
Ji Hun (jihunkimkw at gmail.com)
We also thank bug reporters who helped us improve JMeter.
Two types of Senders are available. TextGraphiteMetricsSender, PickleGraphiteMetricsSender
+
+
For plaintext protocol, set graphiteMetricsSender parameter to org.apache.jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender
+
For pickle protocol, set graphiteMetricsSender parameter to org.apache.jmeter.visualizers.backend.graphite.PickleGraphiteMetricsSender
+
+
To send large amounts of data, use the Pickle sender. It is an efficient transmission method compared to textplain.
+ Read this for more details Graphite documentation.