(jmeter) branch master updated: Fixed grammar

2024-06-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 174ba3178f Fixed grammar
174ba3178f is described below

commit 174ba3178f287d2984b1e53004e2c2cee116
Author: David Coomber <47242934+dcoom...@users.noreply.github.com>
AuthorDate: Sun Jun 23 12:53:21 2024 +0200

Fixed grammar
---
 src/jorphan/src/main/java/org/apache/jorphan/exec/KeyToolUtils.java | 4 ++--
 xdocs/usermanual/component_reference.xml| 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/src/jorphan/src/main/java/org/apache/jorphan/exec/KeyToolUtils.java 
b/src/jorphan/src/main/java/org/apache/jorphan/exec/KeyToolUtils.java
index e09387dfeb..cf184c04a1 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/exec/KeyToolUtils.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/exec/KeyToolUtils.java
@@ -53,7 +53,7 @@ public class KeyToolUtils {
 /** Name of property that can be used to override the default keytool 
location */
 private static final String KEYTOOL_DIRECTORY = "keytool.directory"; // 
$NON-NLS-1$
 
-private static final String DNAME_INTERMEDIATE_CA_KEY  = "cn=JMeter 
Intermediate CA for recording (INSTALL ONLY IF ITS YOURS)"; // $NON-NLS-1$
+private static final String DNAME_INTERMEDIATE_CA_KEY  = "cn=JMeter 
Intermediate CA for recording (INSTALL ONLY IF IT IS YOURS)"; // $NON-NLS-1$
 
 public static final String ROOT_CACERT_CRT_PFX = 
"ApacheJMeterTemporaryRootCA"; // $NON-NLS-1$ (do not change)
 private static final String ROOT_CACERT_CRT = ROOT_CACERT_CRT_PFX + 
".crt"; // $NON-NLS-1$ (Firefox and Windows)
@@ -73,7 +73,7 @@ public class KeyToolUtils {
 static {
 StringBuilder sb = new StringBuilder();
 
-sb.append("CN=_ JMeter Root CA for recording (INSTALL ONLY IF ITS 
YOURS)"); // $NON-NLS-1$
+sb.append("CN=_ JMeter Root CA for recording (INSTALL ONLY IF IT IS 
YOURS)"); // $NON-NLS-1$
 String userName = System.getProperty("user.name"); // $NON-NLS-1$
 userName = userName.replace('\\','/'); // Backslash is special 
(Bugzilla 56178)
 addElement(sb, "OU=Username: ", userName); // $NON-NLS-1$
diff --git a/xdocs/usermanual/component_reference.xml 
b/xdocs/usermanual/component_reference.xml
index bafe02dbd2..5733903554 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -6832,9 +6832,9 @@ As a consequence:
 The browser should display a dialogue asking if you want to accept the 
certificate or not. For example:
 
 1) The server's name "www.example.com" does not match the 
certificate's name
-   "_ JMeter Root CA for recording (INSTALL ONLY IF ITS YOURS)". 
Somebody may be trying to eavesdrop on you.
-2) The certificate for "_ JMeter Root CA for recording (INSTALL ONLY IF 
ITS YOURS)" is signed by the unknown Certificate Authority
-   "_ JMeter Root CA for recording (INSTALL ONLY IF ITS YOURS)". 
It is not possible to verify that this is a valid certificate.
+   "_ JMeter Root CA for recording (INSTALL ONLY IF IT IS 
YOURS)". Somebody may be trying to eavesdrop on you.
+2) The certificate for "_ JMeter Root CA for recording (INSTALL ONLY IF 
IT IS YOURS)" is signed by the unknown Certificate Authority
+   "_ JMeter Root CA for recording (INSTALL ONLY IF IT IS 
YOURS)". It is not possible to verify that this is a valid certificate.
 
 You will need to accept the certificate in order to allow the JMeter Proxy to 
intercept the SSL traffic in order to
 record it.



[jmeter] branch master updated: Use parameter to make junit tests shorter

2023-05-05 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2dc9411d56 Use parameter to make junit tests shorter
2dc9411d56 is described below

commit 2dc9411d5600c8454b114ee76058e5477ba2b26f
Author: Felix Schumacher 
AuthorDate: Fri May 5 16:59:04 2023 +0200

Use parameter to make junit tests shorter
---
 .../jmeter/assertions/TestJSONPathAssertion.java   | 76 +-
 1 file changed, 18 insertions(+), 58 deletions(-)

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 a2a9c6b3ca..59e442aa68 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
@@ -99,68 +99,31 @@ class TestJSONPathAssertion {
 assertFalse(result.isFailure());
 }
 
-@Test
-void testGetResult_positive_regexp_for_floating_point() {
-SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 
123.45}".getBytes(Charset.defaultCharset()));
-
-JSONPathAssertion instance = new JSONPathAssertion();
-instance.setJsonPath("$.myval");
-instance.setJsonValidationBool(true);
-instance.setExpectedValue("^\\d+\\.\\d+$");
-AssertionResult expResult = new AssertionResult("");
-AssertionResult result = instance.getResult(samplerResult);
-assertEquals(expResult.getName(), result.getName());
-assertFalse(result.isFailure());
-}
-
-@Test
-void testGetResult_positive_wrong_regexp_for_floating_point() {
-SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 
123.45}".getBytes(Charset.defaultCharset()));
-
-JSONPathAssertion instance = new JSONPathAssertion();
-instance.setJsonPath("$.myval");
-instance.setJsonValidationBool(true);
-instance.setExpectedValue("^\\d+,\\d+$");
-AssertionResult expResult = new AssertionResult("");
-AssertionResult result = instance.getResult(samplerResult);
-assertEquals(expResult.getName(), result.getName());
-assertTrue(result.isFailure());
-}
-@Test
-void testGetResult_positive_regexp() {
-SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 
123}".getBytes(Charset.defaultCharset()));
-
-JSONPathAssertion instance = new JSONPathAssertion();
-instance.setJsonPath("$.myval");
-instance.setJsonValidationBool(true);
-instance.setExpectedValue("(123|456)");
-AssertionResult expResult = new AssertionResult("");
-AssertionResult result = instance.getResult(samplerResult);
-assertEquals(expResult.getName(), result.getName());
-assertFalse(result.isFailure());
-
-samplerResult.setResponseData("{\"myval\": 
456}".getBytes(Charset.defaultCharset()));
-AssertionResult result2 = instance.getResult(samplerResult);
-assertFalse(result2.isFailure());
-}
-
-@Test
-void testGetResult_positive_invert() {
+@ParameterizedTest
+@CsvSource({
+"123.45,'^\\d+\\.\\d+$',false,false",
+"123.45,'^\\d+\\.\\d+$',true,true",
+"123.45,'^\\d+,\\d+$',false,true",
+"123.45,'^\\d+,\\d+$',true,false",
+"123,'(123|456)',false,false",
+"123,'(123|456)',true,true",
+"456,'(123|456)',false,false",
+"456,'(123|456)',true,true",
+"some string,some.+,false,false",
+"some string,some.+,true,true",
+})
+void testGetResult_regexp(String value, String regex, boolean inverted, 
boolean expectedFailure) {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 
123}".getBytes(Charset.defaultCharset()));
-
+samplerResult.setResponseData(("{\"myval\": " + value + 
'}').getBytes(Charset.defaultCharset()));
 JSONPathAssertion instance = new JSONPathAssertion();
 instance.setJsonPath("$.myval");
 instance.setJsonValidationBool(true);
-instance.setExpectedValue("123");
-instance.setInvert(true);
+instance.setExpectedValue(regex);
+instance.setInvert(inverted);
 AssertionResult expRes

[jmeter] branch master updated: Remove public modifiers from JUnit5 tests

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4f9e9bc8b6 Remove public modifiers from JUnit5 tests
4f9e9bc8b6 is described below

commit 4f9e9bc8b6f1cdea7cbaeeebefdda7cae8182fd5
Author: Felix Schumacher 
AuthorDate: Mon May 1 18:08:16 2023 +0200

Remove public modifiers from JUnit5 tests
---
 .../apache/jmeter/config/gui/TestArgumentsPanel.java   |  6 +++---
 .../protocol/http/visualizers/RequestViewHTTPTest.java | 18 +-
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
 
b/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
index 47d5dd923b..19bf917363 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
@@ -30,14 +30,14 @@ import org.junit.jupiter.params.provider.CsvSource;
  * arguments (or parameters) are usually used to provide configuration values
  * for some other component.
  */
-public class TestArgumentsPanel {
+class TestArgumentsPanel {
 
 /**
  * Test that adding an argument to the table results in an appropriate
  * TestElement being created.
  */
 @Test
-public void testArgumentCreation() throws Exception {
+void testArgumentCreation() throws Exception {
 ArgumentsPanel gui = new ArgumentsPanel();
 gui.tableModel.addRow(new Argument());
 gui.tableModel.setValueAt("howdy", 0, 0);
@@ -56,7 +56,7 @@ public class TestArgumentsPanel {
 "WITH_SUFFIX_SPACE ,WITH_SUFFIX_SPACE",
 " WITH_PREFIX_SPACE,WITH_PREFIX_SPACE"
 }, ignoreLeadingAndTrailingWhitespace = false)
-public void testArgumentNames(String name, String expectedName) throws 
Exception {
+void testArgumentNames(String name, String expectedName) throws Exception {
 ArgumentsPanel gui = new ArgumentsPanel();
 gui.tableModel.addRow(new Argument());
 gui.tableModel.setValueAt(name, 0, 0);
diff --git 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTPTest.java
 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTPTest.java
index 974c992498..4fcb3dd462 100644
--- 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTPTest.java
+++ 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTPTest.java
@@ -33,10 +33,10 @@ import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.MethodSource;
 
-public class RequestViewHTTPTest {
+class RequestViewHTTPTest {
 
 @Test
-public void testGetQueryMapValueContainingAmpersand() {
+void testGetQueryMapValueContainingAmpersand() {
 // see https://bz.apache.org/bugzilla/show_bug.cgi?id=58413
 String query = "login=toto1=Welcome%261";
 Map params = RequestViewHTTP.getQueryMap(query);
@@ -57,7 +57,7 @@ public class RequestViewHTTPTest {
 
 //http://www.foo.com/test/json/get.jsp?postalCode=59115=
 @Test
-public void testGetQueryMapWithEmptyValue() {
+void testGetQueryMapWithEmptyValue() {
 String query = "postalCode=59115=";
 Map params = RequestViewHTTP.getQueryMap(query);
 
@@ -76,7 +76,7 @@ public class RequestViewHTTPTest {
 }
 
 @Test
-public void testGetQueryMapMultipleValues() {
+void testGetQueryMapMultipleValues() {
 String query = "param2=15=12=baulpismuth";
 Map params = RequestViewHTTP.getQueryMap(query);
 
@@ -96,7 +96,7 @@ public class RequestViewHTTPTest {
 }
 
 @Test
-public void testGetQueryMapAmpInValue() {
+void testGetQueryMapAmpInValue() {
 String query = "param2=15=12=baul%26Pismuth";
 Map params = RequestViewHTTP.getQueryMap(query);
 
@@ -120,7 +120,7 @@ public class RequestViewHTTPTest {
 }
 
 @Test
-public void testGetQueryMapBug54055() {
+void testGetQueryMapBug54055() {
 String query = 
"param2=15=12=bu4m1KzFvsozCnR4lra0%2Be69YzpnRcF09nDjc3VJvl8%3D";
 Map params = RequestViewHTTP.getQueryMap(query);
 
@@ -144,7 +144,7 @@ public class RequestViewHTTPTest {
 }
 
 @Test
-public void testGetQueryMapBug52491() {
+void testGetQueryMapBug52491() {
 String query = 
"119"
 + "\n"
 + "";
@@ -161,7 +161,7 @@ public class RequestViewHTTPTest {
 }
 
 @Test
-public void testGetQueryMapSoapHack() {
+void testGetQue

[jmeter] branch master updated: Trim variable names in Argument objects

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c361c4499b Trim variable names in Argument objects
c361c4499b is described below

commit c361c4499be641b5f3e6b30f8c129df857cbefce
Author: Felix Schumacher 
AuthorDate: Mon May 1 15:48:16 2023 +0200

Trim variable names in Argument objects

Should fix #5872
---
 .../jmeter/config/gui/TestArgumentsPanel.java  | 18 ++
 .../java/org/apache/jmeter/config/Argument.java|  5 +--
 .../org/apache/jmeter/config/ArgumentTest.java | 38 ++
 xdocs/changes.xml  |  1 +
 4 files changed, 60 insertions(+), 2 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
 
b/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
index 3d25260e59..47d5dd923b 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/config/gui/TestArgumentsPanel.java
@@ -22,6 +22,8 @@ import static org.junit.Assert.assertEquals;
 import org.apache.jmeter.config.Argument;
 import org.apache.jmeter.config.Arguments;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
 
 /**
  * A GUI panel allowing the user to enter name-value argument pairs. These
@@ -45,4 +47,20 @@ public class TestArgumentsPanel {
 assertEquals("=", ((Argument) ((Arguments) 
gui.createTestElement()).getArguments().get(0).getObjectValue())
 .getMetaData());
 }
+
+
+@ParameterizedTest
+@CsvSource(value = {
+"WITHOUT_SPACE,WITHOUT_SPACE",
+" WITH_OUTER_SPACE ,WITH_OUTER_SPACE",
+"WITH_SUFFIX_SPACE ,WITH_SUFFIX_SPACE",
+" WITH_PREFIX_SPACE,WITH_PREFIX_SPACE"
+}, ignoreLeadingAndTrailingWhitespace = false)
+public void testArgumentNames(String name, String expectedName) throws 
Exception {
+ArgumentsPanel gui = new ArgumentsPanel();
+gui.tableModel.addRow(new Argument());
+gui.tableModel.setValueAt(name, 0, 0);
+
+assertEquals(expectedName, ((Argument) ((Arguments) 
gui.createTestElement()).getArguments().get(0).getObjectValue()).getName());
+}
 }
diff --git a/src/core/src/main/java/org/apache/jmeter/config/Argument.java 
b/src/core/src/main/java/org/apache/jmeter/config/Argument.java
index 04ca8a2c8d..b97c0fa74e 100644
--- a/src/core/src/main/java/org/apache/jmeter/config/Argument.java
+++ b/src/core/src/main/java/org/apache/jmeter/config/Argument.java
@@ -19,6 +19,7 @@ package org.apache.jmeter.config;
 
 import java.io.Serializable;
 
+import org.apache.commons.lang3.StringUtils;
 import org.apache.jmeter.testelement.AbstractTestElement;
 import org.apache.jmeter.testelement.property.StringProperty;
 import org.apache.jorphan.util.JOrphanUtils;
@@ -92,7 +93,7 @@ public class Argument extends AbstractTestElement implements 
Serializable {
  */
 public Argument(String name, String value, String metadata, String 
description) {
 if(name != null) {
-setProperty(new StringProperty(ARG_NAME, name));
+setProperty(new StringProperty(ARG_NAME, StringUtils.strip(name)));
 }
 if(value != null) {
 setProperty(new StringProperty(VALUE, value));
@@ -113,7 +114,7 @@ public class Argument extends AbstractTestElement 
implements Serializable {
  */
 @Override
 public void setName(String newName) {
-setProperty(new StringProperty(ARG_NAME, newName));
+setProperty(new StringProperty(ARG_NAME, StringUtils.strip(newName)));
 }
 
 /**
diff --git a/src/core/src/test/java/org/apache/jmeter/config/ArgumentTest.java 
b/src/core/src/test/java/org/apache/jmeter/config/ArgumentTest.java
new file mode 100644
index 00..27113227c2
--- /dev/null
+++ b/src/core/src/test/java/org/apache/jmeter/config/ArgumentTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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 implie

[jmeter] branch master updated: Markup changes

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 81536c95aa Markup changes
81536c95aa is described below

commit 81536c95aad04ddfac6752afed37cada4e84fa0b
Author: Felix Schumacher 
AuthorDate: Mon May 1 16:28:02 2023 +0200

Markup changes
---
 xdocs/changes.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 9f35c6479e..6ad4153dc5 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -141,14 +141,15 @@ Summary
 Listeners
 
   57405741Fix Aggregated Graph component to cope 
with empty names of samplers
-  5807Fix an ArrayIndexOutOfBoundsException on HTTP 
parameters line on special case when key and value are empty, i.e.: 
"k1=v1k2=v2"
+  5807Fix an ArrayIndexOutOfBoundsException on 
HTTP parameters line on special case when key and value are empty,
+i.e.: "k1=v1k2=v2"
   56545785 Fix 
InfluxDBRawBackendListenerClient missing data. Allow InfluxDB to 
insert multiple entries with the
 same timestamp but with different threadName. 
Contributed by Victor Peralta (vperaltac at github)
 
 
 Timers, Assertions, Config, Pre-  Post-Processors
 
-  5717Add jsonpath string to jsonpath assertion error message so 
the error is easier to understand
+  5717Add jsonpath string to JSON Path Assertion error message so 
the error is easier to understand
   723Use correct number format on JSON Path Assertion. 
Contributed by andreaslind01 (andreaslind01 at gmail.com)
 
 



[jmeter] 03/04: Use SwingWorker for all classes on construction for tests

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 8bcdf290cf881b1c2ac89b813fdfb596713a0f01
Author: Felix Schumacher 
AuthorDate: Sun Apr 30 12:12:52 2023 +0200

Use SwingWorker for all classes on construction for tests
---
 .../jmeter/gui/action/SelectTemplatesDialog.java   |  5 +-
 .../java/org/apache/jmeter/junit/JMeterTest.java   | 55 +-
 2 files changed, 35 insertions(+), 25 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
 
b/src/core/src/main/java/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
index deb9a33720..9f017d7c9e 100644
--- 
a/src/core/src/main/java/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
+++ 
b/src/core/src/main/java/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
@@ -47,7 +47,6 @@ import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JRootPane;
 import javax.swing.JScrollPane;
-import javax.swing.SwingUtilities;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.event.HyperlinkEvent;
@@ -261,9 +260,7 @@ public class SelectTemplatesDialog extends JDialog 
implements ChangeListener, Ac
 
 this.pack();
 this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, 
MINIMAL_BOX_HEIGHT));
-SwingUtilities.invokeLater(() ->
-ComponentUtil.centerComponentInWindow(this, 50) // center position 
and 50% of screen size
-);
+ComponentUtil.centerComponentInWindow(this, 50); // center position 
and 50% of screen size
 populateTemplatePage();
 }
 
diff --git 
a/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java 
b/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
index 9297edc514..5d7a22076e 100644
--- a/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
+++ b/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
@@ -39,7 +39,9 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
 
+import javax.swing.SwingUtilities;
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
@@ -457,28 +459,41 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 Iterator classes = ClassFinder
 .findClassesThatExtend(JMeterUtils.getSearchPaths(), new 
Class[] { extendsClass }).iterator();
 List objects = new ArrayList<>();
-String n = "";
+String className = "";
 boolean caughtError = true;
-Throwable caught = null;
+final AtomicReference exceptionCatcher = new 
AtomicReference<>();
+final AtomicReference unexpectedExceptionCatcher = new 
AtomicReference<>();
 try {
 while (classes.hasNext()) {
-n = classes.next();
+className = classes.next();
 // TODO - improve this check
-if (n.endsWith("RemoteJMeterEngineImpl")) {
+if (className.endsWith("RemoteJMeterEngineImpl")) {
 continue; // Don't try to instantiate remote server
 }
-if (n.endsWith("RemoteSampleListenerImpl")) {
+if (className.endsWith("RemoteSampleListenerImpl")) {
 // TODO: Cannot start. 
travis-job-e984b3d5-f93f-4b0f-b6c0-50988a5ece9d is a loopback address.
 continue;
 }
-caught = instantiateClass(exName, myThis, objects, n, caught);
+String currentClassName = className;
+// Construct classes in the AWT thread, as we may have found 
classes, that
+// assume to be constructed in the AWT thread.
+SwingUtilities.invokeAndWait(() -> {
+try {
+instantiateClass(exName, myThis, objects, 
currentClassName, exceptionCatcher);
+} catch (Exception e) {
+unexpectedExceptionCatcher.set(e);
+}
+});
+if (unexpectedExceptionCatcher.get() != null) {
+throw unexpectedExceptionCatcher.get();
+}
 }
 caughtError = false;
 } finally {
 if (caughtError) {
-System.out.println("Last class=" + n);
+System.out.println("Last class=" + className);
 System.out.println("objects.size=" + objects.size());
-System.out.println("Last error=" + caught);

[jmeter] 04/04: Fix a few warnings shown by IDE

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 0fb9a6f4b3e9d272912e483434cac0947ac02373
Author: Felix Schumacher 
AuthorDate: Sun Apr 30 12:36:59 2023 +0200

Fix a few warnings shown by IDE
---
 .../java/org/apache/jmeter/junit/JMeterTest.java   | 27 ++
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git 
a/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java 
b/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
index 5d7a22076e..60d6a3f323 100644
--- a/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
+++ b/src/dist-check/src/test/java/org/apache/jmeter/junit/JMeterTest.java
@@ -22,7 +22,6 @@ import java.awt.HeadlessException;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInputStream;
@@ -63,7 +62,6 @@ import org.junit.runner.Description;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
@@ -122,7 +120,7 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 StringBuilder sb = new StringBuilder();
 sb.append(getName());
 if (guiItem instanceof TestBeanGUI) {
-sb.append(" ").append(guiItem.toString());
+sb.append(" ").append(guiItem);
 } else if (guiItem != null) {
 sb.append(" ").append(guiItem.getClass().getName());
 } else if (serObj != null) {
@@ -190,13 +188,12 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 }
 
 /**
- * @return
- * @throws ParserConfigurationException
- * @throws IOException
- * @throws SAXException
- * @throws FileNotFoundException
+ * @return first element named {@code body}
+ * @throws ParserConfigurationException when stream contains invalid XML
+ * @throws IOException when stream can not be read
+ * @throws SAXException in case of XML parsing error
  */
-private Element getBodyFromXMLDocument(InputStream stream)
+private org.w3c.dom.Element getBodyFromXMLDocument(InputStream stream)
 throws ParserConfigurationException, SAXException, IOException {
 DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 dbf.setIgnoringElementContentWhitespace(true);
@@ -242,14 +239,14 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 }
 
 int unseen = 0;
-for (String key : s) {
-if (!m.get(key).equals(Boolean.TRUE)) {
+for (Map.Entry entry : m.entrySet()) {
+if (!entry.getValue().equals(Boolean.TRUE)) {
 if (unseen == 0)// first time
 {
 System.out.println("\nNames remaining in " + t + " Map:");
 }
 unseen++;
-System.out.println(key);
+System.out.println(entry.getKey());
 }
 }
 return unseen;
@@ -318,7 +315,7 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
  * Test GUI elements - run the test
  */
 public void runGUITitle() throws Exception {
-if (guiTitles.size() > 0) {
+if (!guiTitles.isEmpty()) {
 String title = guiItem.getDocAnchor();
 boolean ct = guiTitles.containsKey(title);
 if (ct) {
@@ -326,7 +323,7 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 }
 String name = guiItem.getClass().getName();
 if (// Is this a work in progress or an internal GUI component?
-title != null && title.length() > 0 // Will be "" for internal 
components
+title != null && !title.isEmpty() // Will be "" for internal 
components
 && !title.toUpperCase(Locale.ENGLISH).contains("(ALPHA")
 && !title.toUpperCase(Locale.ENGLISH).contains("(BETA")
 && !title.toUpperCase(Locale.ENGLISH).contains("(DEPRECATED")
@@ -356,7 +353,7 @@ public class JMeterTest extends JMeterTestCaseJUnit 
implements Describable {
 try {
 String label = guiItem.getLabelResource();
 assertNotNull("Label should not be null for "+name, label);
-assertTrue("Label should not be empty for "+name, 
label.length() > 0);
+assertTrue(&q

[jmeter] 01/04: Try to overcome a deadlock in test suite

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit f88e809450b670b0cfaecf344c29cc24afa884ec
Author: Felix Schumacher 
AuthorDate: Sat Apr 29 21:41:37 2023 +0200

Try to overcome a deadlock in test suite

When running locally, I observed the following deadlock:

"AWT-EventQueue-1" #23 prio=6 os_prio=0 tid=0x7f3de9bf6800 nid=0x722b2 
waiting for monitor entry [0x7f3dcb4ee000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at 
java.awt.Component$AccessibleAWTComponent.getLocationOnScreen(Component.java:9494)
- waiting to lock <0xe0653ef0> (a 
java.awt.Component$AWTTreeLock)
at 
javax.swing.JComponent$AccessibleJComponent.getLocationOnScreen(JComponent.java:3663)
at 
javax.swing.text.JTextComponent$AccessibleJTextComponent.(JTextComponent.java:2516)
at 
javax.swing.JEditorPane$AccessibleJEditorPane.(JEditorPane.java:1644)
at 
javax.swing.JEditorPane$JEditorPaneAccessibleHypertextSupport.(JEditorPane.java:1971)
at 
javax.swing.JEditorPane$AccessibleJEditorPaneHTML.getAccessibleText(JEditorPane.java:1703)
at 
org.GNOME.Accessibility.AtkObject.lambda$getTFlagFromObj$0(AtkObject.java:70)
at 
org.GNOME.Accessibility.AtkObject$$Lambda$317/331870887.call(Unknown Source)
at org.GNOME.Accessibility.AtkUtil.invokeInSwing(AtkUtil.java:58)
at 
org.GNOME.Accessibility.AtkObject.getTFlagFromObj(AtkObject.java:55)
at org.GNOME.Accessibility.AtkWrapper.boundsChanged(Native Method)
at 
org.GNOME.Accessibility.AtkWrapper$3.componentResized(AtkWrapper.java:235)
at 
java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:159)
at java.awt.Component.processComponentEvent(Component.java:6365)
at java.awt.Component.processEvent(Component.java:6319)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at 
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at 
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at 
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at 
org.GNOME.Accessibility.AtkWrapper$6.dispatchEvent(AtkWrapper.java:717)
at 
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at 
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

"Test worker" #1 prio=5 os_prio=0 tid=0x7f3de8012000 nid=0x7228f 
waiting on condition [0x7f3def695000]
   java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0xf80386a8> (a 
java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.GNOME.Accessibility.AtkUtil.invokeInSwing(AtkUtil.java:68)
at org.GNOME.Accessibility.AtkObject.hashCode(AtkObject.java:234)
at org.GNOME.Accessibility.AtkWrapper.emitSignal(Native Method)
at 
org.GNOME.Accessibility.AtkWrapper$5.propertyChange(AtkWrapper.java:557)
at 
java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at 
java.beans.PropertyChangeSupport.firePropertyChang

[jmeter] 02/04: Simplify logic to reduce recursion

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit c144f3c99ad18351575a542ca205eeae19bafe90
Author: Felix Schumacher 
AuthorDate: Sat Apr 29 21:43:01 2023 +0200

Simplify logic to reduce recursion

and correct a few typos, while we are here.
---
 .../main/java/org/apache/jorphan/gui/ComponentUtil.java   | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git 
a/src/jorphan/src/main/java/org/apache/jorphan/gui/ComponentUtil.java 
b/src/jorphan/src/main/java/org/apache/jorphan/gui/ComponentUtil.java
index a926a78602..754b914939 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/gui/ComponentUtil.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/gui/ComponentUtil.java
@@ -23,7 +23,7 @@ import java.awt.Rectangle;
 
 /**
  * This class is a Util for awt Component and could be used to place them in
- * center of an other.
+ * center of another.
  *
  */
 public final class ComponentUtil {
@@ -36,19 +36,12 @@ public final class ComponentUtil {
  * @param component
  *the component you want to center and set size on
  * @param percentOfScreen
- *the percent of the current screensize you want the component
+ *the percent of the current screen size you want the component
  *to be
  */
 public static void centerComponentInWindow(Component component, int 
percentOfScreen) {
-if (percentOfScreen < 0) {
-centerComponentInWindow(component, -percentOfScreen);
-return;
-}
-if (percentOfScreen > 100) {
-centerComponentInWindow(component, 100);
-return;
-}
-double percent = percentOfScreen / 100.d;
+int validPercentOfScreen = Math.min(Math.abs(percentOfScreen), 100);
+double percent = validPercentOfScreen / 100.d;
 Rectangle bounds = 
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getBounds();
 component.setSize((int) (bounds.getWidth() * percent), (int) 
(bounds.getHeight() * percent));
 centerComponentInWindow(component);



[jmeter] branch master updated (0a193334c4 -> 0fb9a6f4b3)

2023-05-01 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 0a193334c4 chore: add --release 8 when compiling with Java 10+ so the 
generated bytecode uses Java 8 methods only
 new f88e809450 Try to overcome a deadlock in test suite
 new c144f3c99a Simplify logic to reduce recursion
 new 8bcdf290cf Use SwingWorker for all classes on construction for tests
 new 0fb9a6f4b3 Fix a few warnings shown by IDE

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/jmeter/junit/JMeterTest.java   | 82 --
 .../java/org/apache/jorphan/gui/ComponentUtil.java | 15 ++--
 2 files changed, 50 insertions(+), 47 deletions(-)



[jmeter] branch master updated (238a915ae3 -> 2f47db30a2)

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 238a915ae3 Add changes for InfluxDBRawBackendListenerClient to 
changelog
 new 34dfaffb18 Website used for testing has gone, use another one
 new 2f47db30a2 Partly revert 5d29e24f4ba720b8da3d1ef1e6ecf4c991f4fb31

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 bin/testfiles/TEST_HTTPS.jmx | 4 ++--
 src/bom-testing/build.gradle.kts | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)



[jmeter] 02/02: Partly revert 5d29e24f4ba720b8da3d1ef1e6ecf4c991f4fb31

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 2f47db30a256cada938bf04a991a5269425a94b5
Author: Felix Schumacher 
AuthorDate: Sat Apr 29 18:36:42 2023 +0200

Partly revert 5d29e24f4ba720b8da3d1ef1e6ecf4c991f4fb31

ActiveMQ 5.17 and up can not be used with Java 8.
---
 src/bom-testing/build.gradle.kts | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bom-testing/build.gradle.kts b/src/bom-testing/build.gradle.kts
index 63e8e1c7ce..3d2ece0ec4 100644
--- a/src/bom-testing/build.gradle.kts
+++ b/src/bom-testing/build.gradle.kts
@@ -41,9 +41,9 @@ dependencies {
 api("junit:junit:4.13.2")
 api("nl.jqno.equalsverifier:equalsverifier:3.14.1")
 // activemq-all should not be used as it provides secondary slf4j 
binding
-api("org.apache.activemq:activemq-broker:5.18.1")
-api("org.apache.activemq:activemq-client:5.18.1")
-api("org.apache.activemq:activemq-spring:5.18.1")
+api("org.apache.activemq:activemq-broker:5.16.4")
+api("org.apache.activemq:activemq-client:5.16.4")
+api("org.apache.activemq:activemq-spring:5.16.4")
 api("org.apache.ftpserver:ftplet-api:1.2.0")
 api("org.apache.ftpserver:ftpserver-core:1.2.0")
 api("org.apache.mina:mina-core:2.2.1")



[jmeter] 01/02: Website used for testing has gone, use another one

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 34dfaffb136b52b2ba0b4a89ebb49069dd83
Author: Felix Schumacher 
AuthorDate: Sat Apr 29 18:35:22 2023 +0200

Website used for testing has gone, use another one

A better fix would be to use a local setup, that would never
go away.
---
 bin/testfiles/TEST_HTTPS.jmx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/testfiles/TEST_HTTPS.jmx b/bin/testfiles/TEST_HTTPS.jmx
index a2a3689c30..6ffa072c54 100644
--- a/bin/testfiles/TEST_HTTPS.jmx
+++ b/bin/testfiles/TEST_HTTPS.jmx
@@ -30,7 +30,7 @@
   
 
   
-  analytics.usa.gov
+  jmeter.apache.org
   
   https
   
@@ -48,7 +48,7 @@
 
   
 
-  meta 
property=og:title content=analytics.usa.gov | The US 
governments web traffic. /
+  Apache JMeter
 
 Assertion.response_data
 false



[jmeter] 02/03: include threadName tag in InfluxDBRawBackendListener tests

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 121944d73ac64de10754809544a219eb6e2f6128
Author: Victor Peralta 
AuthorDate: Mon Mar 6 00:52:21 2023 +0100

include threadName tag in InfluxDBRawBackendListener tests
---
 .../backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy| 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
 
b/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
index 4a2a893777..5390a2507b 100644
--- 
a/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
+++ 
b/src/components/src/test/groovy/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy
@@ -33,6 +33,7 @@ class InfluxDBRawBackendListenerClientSpec extends 
Specification {
 okSample.setLatency(42)
 okSample.setConnectTime(7)
 okSample.setSampleLabel("myLabel")
+okSample.setThreadName("myThread")
 okSample.setResponseOK()
 return okSample
 }
@@ -62,7 +63,7 @@ class InfluxDBRawBackendListenerClientSpec extends 
Specification {
 def tags = sut.createTags(okSample)
 def fields = sut.createFields(okSample)
 then:
-tags == "status=ok,transaction=myLabel"
+tags == "status=ok,transaction=myLabel,threadName=myThread"
 fields == "duration=100,ttfb=42,connectTime=7"
 }
 
@@ -70,8 +71,9 @@ class InfluxDBRawBackendListenerClientSpec extends 
Specification {
 given:
 def koSample = new SampleResult()
 koSample.setSampleLabel("myLabel")
+koSample.setThreadName("myThread")
 expect:
-sut.createTags(koSample) == "status=ko,transaction=myLabel"
+sut.createTags(koSample) == 
"status=ko,transaction=myLabel,threadName=myThread"
 }
 
 def "Upon handling sample result data is added to influxDBMetricsManager 
and written"() {



[jmeter] 01/03: add new threadName tag to InfluxDBRawBackendListener

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 442d27e0c8cf2b10da37ba8c18ea98084c71e9d1
Author: Victor Peralta 
AuthorDate: Mon Mar 6 00:51:20 2023 +0100

add new threadName tag to InfluxDBRawBackendListener
---
 .../backend/influxdb/InfluxDBRawBackendListenerClient.java| 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/src/components/src/main/java/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClient.java
 
b/src/components/src/main/java/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClient.java
index 477a25a50a..0e781ce610 100644
--- 
a/src/components/src/main/java/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClient.java
+++ 
b/src/components/src/main/java/org/apache/jmeter/visualizers/backend/influxdb/InfluxDBRawBackendListenerClient.java
@@ -122,8 +122,10 @@ public class InfluxDBRawBackendListenerClient implements 
BackendListenerClient {
 // remove surrounding quotes and spaces from sample label
 String label = StringUtils.strip(sampleResult.getSampleLabel(), "\" ");
 String transaction = 
AbstractInfluxdbMetricsSender.tagToStringValue(label);
+String threadName = 
StringUtils.deleteWhitespace(sampleResult.getThreadName());
 return "status=" + status
-+ ",transaction=" + transaction;
++ ",transaction=" + transaction
++ ",threadName=" + threadName;
 }
 
 private String createFields(SampleResult sampleResult) {



[jmeter] branch master updated (4846dc4e57 -> 238a915ae3)

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 4846dc4e57 Add test for JSONPathAssertion with floating point number
 new 442d27e0c8 add new threadName tag to InfluxDBRawBackendListener
 new 121944d73a include threadName tag in InfluxDBRawBackendListener tests
 new 238a915ae3 Add changes for InfluxDBRawBackendListenerClient to 
changelog

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../backend/influxdb/InfluxDBRawBackendListenerClient.java  | 4 +++-
 .../backend/influxdb/InfluxDBRawBackendListenerClientSpec.groovy| 6 --
 xdocs/changes.xml   | 3 +++
 3 files changed, 10 insertions(+), 3 deletions(-)



[jmeter] 03/03: Add changes for InfluxDBRawBackendListenerClient to changelog

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 238a915ae30946bddd67d4d3d7e2bdae6d2eb18d
Author: Felix Schumacher 
AuthorDate: Sat Apr 29 18:05:21 2023 +0200

Add changes for InfluxDBRawBackendListenerClient to changelog
---
 xdocs/changes.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index fef507cfb9..9f35c6479e 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -142,6 +142,8 @@ Summary
 
   57405741Fix Aggregated Graph component to cope 
with empty names of samplers
   5807Fix an ArrayIndexOutOfBoundsException on HTTP 
parameters line on special case when key and value are empty, i.e.: 
"k1=v1k2=v2"
+  56545785 Fix 
InfluxDBRawBackendListenerClient missing data. Allow InfluxDB to 
insert multiple entries with the
+same timestamp but with different threadName. 
Contributed by Victor Peralta (vperaltac at github)
 
 
 Timers, Assertions, Config, Pre-  Post-Processors
@@ -186,6 +188,7 @@ Summary
   Ori Marko (orimarko at gmail.com)
   Stefan Seide (stefan at trilobyte-se.de)
   andreaslind01 Lind (andreaslind01 at gmail.com)
+  Victor Peralta (vperaltac at github)
 
 We also thank bug reporters who helped us improve JMeter.
 



[jmeter] 01/02: Use correct number format in json assertions with regex

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 1679a714d787da0f5eda1e29ac78bf6d5e8b528e
Author: andreaslind01 
AuthorDate: Fri Aug 5 12:38:41 2022 +0200

Use correct number format in json assertions with regex
---
 .../src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java | 4 +++-
 1 file changed, 3 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 5671e27856..b8e719bb5e 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
@@ -19,6 +19,8 @@ package org.apache.jmeter.assertions;
 
 import java.io.Serializable;
 import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
 
@@ -58,7 +60,7 @@ public class JSONPathAssertion extends AbstractTestElement 
implements Serializab
 ThreadLocal.withInitial(JSONPathAssertion::createDecimalFormat);
 
 private static DecimalFormat createDecimalFormat() {
-DecimalFormat decimalFormatter = new DecimalFormat("#.#");
+DecimalFormat decimalFormatter = new DecimalFormat("#.#", new 
DecimalFormatSymbols(Locale.US));
 decimalFormatter.setMaximumFractionDigits(340); // 
java.text.DecimalFormat.DOUBLE_FRACTION_DIGITS == 340
 decimalFormatter.setMinimumFractionDigits(1);
 return decimalFormatter;



[jmeter] branch master updated (5d18b2ce1e -> 4846dc4e57)

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 5d18b2ce1e Revert "fix(deps): update dependency 
org.apache.commons:commons-jexl3 to v3.3 (#5851)"
 new 1679a714d7 Use correct number format in json assertions with regex
 new 4846dc4e57 Add test for JSONPathAssertion with floating point number

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jmeter/assertions/JSONPathAssertion.java   |  4 ++-
 .../jmeter/assertions/TestJSONPathAssertion.java   | 29 ++
 xdocs/changes.xml  |  2 ++
 3 files changed, 34 insertions(+), 1 deletion(-)



[jmeter] 02/02: Add test for JSONPathAssertion with floating point number

2023-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 4846dc4e57d51e6af67b225be559d4627d519860
Author: Felix Schumacher 
AuthorDate: Fri Apr 28 16:15:50 2023 +0200

Add test for JSONPathAssertion with floating point number

Closes PR #723
---
 .../jmeter/assertions/TestJSONPathAssertion.java   | 29 ++
 xdocs/changes.xml  |  2 ++
 2 files changed, 31 insertions(+)

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 c01f5c5e87..a2a9c6b3ca 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
@@ -99,6 +99,35 @@ class TestJSONPathAssertion {
 assertFalse(result.isFailure());
 }
 
+@Test
+void testGetResult_positive_regexp_for_floating_point() {
+SampleResult samplerResult = new SampleResult();
+samplerResult.setResponseData("{\"myval\": 
123.45}".getBytes(Charset.defaultCharset()));
+
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonPath("$.myval");
+instance.setJsonValidationBool(true);
+instance.setExpectedValue("^\\d+\\.\\d+$");
+AssertionResult expResult = new AssertionResult("");
+AssertionResult result = instance.getResult(samplerResult);
+assertEquals(expResult.getName(), result.getName());
+assertFalse(result.isFailure());
+}
+
+@Test
+void testGetResult_positive_wrong_regexp_for_floating_point() {
+SampleResult samplerResult = new SampleResult();
+samplerResult.setResponseData("{\"myval\": 
123.45}".getBytes(Charset.defaultCharset()));
+
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonPath("$.myval");
+instance.setJsonValidationBool(true);
+instance.setExpectedValue("^\\d+,\\d+$");
+AssertionResult expResult = new AssertionResult("");
+AssertionResult result = instance.getResult(samplerResult);
+assertEquals(expResult.getName(), result.getName());
+assertTrue(result.isFailure());
+}
 @Test
 void testGetResult_positive_regexp() {
 SampleResult samplerResult = new SampleResult();
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index c2769d1058..fef507cfb9 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -147,6 +147,7 @@ Summary
 Timers, Assertions, Config, Pre-  Post-Processors
 
   5717Add jsonpath string to jsonpath assertion error message so 
the error is easier to understand
+  723Use correct number format on JSON Path Assertion. 
Contributed by andreaslind01 (andreaslind01 at gmail.com)
 
 
 Functions
@@ -184,6 +185,7 @@ Summary
   Kai Lehmann (klehmann at aservo.com)
   Ori Marko (orimarko at gmail.com)
   Stefan Seide (stefan at trilobyte-se.de)
+  andreaslind01 Lind (andreaslind01 at gmail.com)
 
 We also thank bug reporters who helped us improve JMeter.
 



[jmeter] branch master updated: Issue 5694: Log a warning if 'u' is found in time functions format string

2023-02-20 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 95ccef20bc Issue 5694: Log a warning if 'u' is found in time functions 
format string
95ccef20bc is described below

commit 95ccef20bcf845a937ba242a0f9b2e1790aadefa
Author: Felix Schumacher 
AuthorDate: Mon Feb 20 15:07:13 2023 +0100

Issue 5694: Log a warning if 'u' is found in time functions format string

A warning will be logged,  if the code 'u' is found in the format string,
as the meaning for that code has changed from day-of-week to year.

Part of #5694
---
 .../main/resources/org/apache/jmeter/resources/messages.properties | 1 +
 .../resources/org/apache/jmeter/resources/messages_fr.properties   | 1 +
 .../src/main/java/org/apache/jmeter/functions/TimeFunction.java| 7 +++
 xdocs/changes.xml  | 4 +++-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties 
b/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
index 4b81a58301..dc93ac77c1 100644
--- 
a/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
+++ 
b/src/core/src/main/resources/org/apache/jmeter/resources/messages.properties
@@ -1331,6 +1331,7 @@ throughput_control_perthread_label=Per User
 throughput_control_title=Throughput Controller
 throughput_control_tplabel=Throughput
 time_format=Format string for SimpleDateFormat (optional)
+time_format_changed=Formatters for time function has been changed from 
SimpleDateFormat to DateTimeFormatter. Especially the meaning of 'u' has 
changed from day-of-week to year. Please check and update your format strings 
accordingly
 time_format_random=Format string for DateTimeFormatter (optional) (default 
-MM-dd)
 time_format_shift=Format string for DateTimeFormatter (optional) (default unix 
timestamp in millisecond)
 timelim=Time limit
diff --git 
a/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
 
b/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
index 729648defc..5a68c3ebd5 100644
--- 
a/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
+++ 
b/src/core/src/main/resources/org/apache/jmeter/resources/messages_fr.properties
@@ -1320,6 +1320,7 @@ throughput_control_perthread_label=Par utilisateur
 throughput_control_title=Contrôleur Débit
 throughput_control_tplabel=Débit \:
 time_format=Chaîne de formatage sur le modèle SimpleDateFormat (optionnel)
+time_format_changed=Les formateurs pour la fonction de temps ont été modifiés 
de SimpleDateFormat à DateTimeFormatter. En particulier, la signification de 
'u' a changé du jour de la semaine à l'année. Veuillez vérifier et mettre à 
jour vos chaînes de format en conséquence
 time_format_random=Chaîne de formatage sur le modèle DateTimeFormatter 
(optionnel) ( défaut \: -MM-dd )
 time_format_shift=Chaîne de formatage sur le modèle DateTimeFormatter 
(optionnel) ( défaut \: unix timestamp en millisecondes )
 timelim=Limiter le temps de réponses à (ms)
diff --git 
a/src/functions/src/main/java/org/apache/jmeter/functions/TimeFunction.java 
b/src/functions/src/main/java/org/apache/jmeter/functions/TimeFunction.java
index 69c90be61d..65e6c01a9d 100644
--- a/src/functions/src/main/java/org/apache/jmeter/functions/TimeFunction.java
+++ b/src/functions/src/main/java/org/apache/jmeter/functions/TimeFunction.java
@@ -32,6 +32,8 @@ import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.samplers.Sampler;
 import org.apache.jmeter.threads.JMeterVariables;
 import org.apache.jmeter.util.JMeterUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // See org.apache.jmeter.functions.TestTimeFunction for unit tests
 
@@ -50,6 +52,8 @@ public class TimeFunction extends AbstractFunction {
 // Only modified in class init
 private static final Map aliases = new HashMap<>();
 
+private static final Logger log = 
LoggerFactory.getLogger(TimeFunction.class);
+
 static {
 desc.add(JMeterUtils.getResString("time_format")); //$NON-NLS-1$
 desc.add(JMeterUtils.getResString("function_name_paropt")); 
//$NON-NLS-1$
@@ -92,6 +96,9 @@ public class TimeFunction extends AbstractFunction {
 long div = Long.parseLong(fmt.substring(1)); // should never 
case NFE
 datetime = Long.toString(System.currentTimeMillis() / div);
 } else {
+if (fmt.contains("u")) {
+log.warn(JMeterUtils.getResString("time_format_changed"));
+}
 DateTimeFormatter df = DateTimeFormatter // Not synchronised, 
so can't be 

[jmeter] branch master updated: Issue 5694: Document changed formatter for function __time()

2023-02-20 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ec3122abf1 Issue 5694: Document changed formatter for function __time()
ec3122abf1 is described below

commit ec3122abf1bc6ed6c7b766bcf55e8d0e7bb48b71
Author: Felix Schumacher 
AuthorDate: Mon Feb 20 14:39:36 2023 +0100

Issue 5694: Document changed formatter for function __time()

Closes #5694
---
 xdocs/changes.xml  |  1 +
 xdocs/usermanual/functions.xml | 10 --
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 57f7e6df46..dcc7b18e6b 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -160,6 +160,7 @@ Summary
 
 Documentation
 
+  5694Document changed formatter for 
 
 
 General
diff --git a/xdocs/usermanual/functions.xml b/xdocs/usermanual/functions.xml
index 23fbe8a3c0..5e4078ea48 100644
--- a/xdocs/usermanual/functions.xml
+++ b/xdocs/usermanual/functions.xml
@@ -1121,7 +1121,7 @@ If omitted, , is used. Note that 
, would need to be sp
 
 
 
-The format to be passed to https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html;>SimpleDateFormat.
+The format to be passed to https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html;>DateTimeFormatter.
 The function supports various shorthand aliases, see below.
 If omitted, the function returns the current time in milliseconds 
since the epoch.
 
@@ -1131,7 +1131,7 @@ If omitted, , is used. Note that 
, would need to be sp
 If the format matches "/ddd" (where ddd are decimal 
digits),
 then the function returns the current time in milliseconds divided by the 
value of ddd.
 For example, "/1000" returns the current time in seconds since 
the epoch.
-Otherwise, the current time is passed to SimpleDateFormat.
+Otherwise, the current time is passed to DateTimeFormatter.
 The following shorthand aliases are provided:
 
 
@@ -1147,6 +1147,12 @@ The following shorthand aliases are provided:
 ${__time(dd/MM/,)}  will return 
21/01/2018 if ran on 21 january 2018
 ${__time(YMD,)}  will return 20180121 if ran 
on 21 january 2018
 ${__time()}  will return time in millis 
1516540541624
+
+ The format to be passed to used to be https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html;>SimpleDateFormat,
+ but that changed with JMeter 5.5 to https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html;>DateTimeFormatter.
+ While they use mostly the same codes, they differ slightly. Most notable is 
probably the code u, that meant
+ day number of week and is now interpreted as year.
+
 
 
 



[jmeter] branch master updated: Javadoc link for commons-math has changed

2023-02-20 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0619b848c6 Javadoc link for commons-math has changed
0619b848c6 is described below

commit 0619b848c62e34ee44c32cc8184a28f953d846f5
Author: Felix Schumacher 
AuthorDate: Mon Feb 20 14:02:41 2023 +0100

Javadoc link for commons-math has changed
---
 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 2643f37f09..68441b1bb8 100644
--- a/xdocs/usermanual/properties_reference.xml
+++ b/xdocs/usermanual/properties_reference.xml
@@ -1165,7 +1165,7 @@ JMETER-SERVER
 Defaults to: 5000
 
 
-Specify the https://commons.apache.org/proper/commons-math/javadocs/api-3.5/org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html;>Percentile
 Estimation Type to use.
+Specify the https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/org/apache/commons/math3/stat/descriptive/rank/Percentile.EstimationType.html;>Percentile
 Estimation Type to use.
 To make the values from the dashboard compatible with the Aggregate 
Report, use the value R_3.
 Defaults to: LEGACY
 



[jmeter] branch master updated: Add missing contributor from list of fixes

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new eb3a225791 Add missing contributor from list of fixes
eb3a225791 is described below

commit eb3a22579161d5e36c372949f9a8cbd055de8b5b
Author: Felix Schumacher 
AuthorDate: Wed Jan 4 21:20:45 2023 +0100

Add missing contributor from list of fixes
---
 xdocs/changes.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index ed84dd721d..55b4a6b08e 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -173,6 +173,7 @@ Summary
 
 
   Kai Lehmann (klehmann at aservo.com)
+  Ori Marko (orimarko at gmail.com)
   Stefan Seide (stefan at trilobyte-se.de)
 
 We also thank bug reporters who helped us improve JMeter.



[jmeter] branch master updated: Correct markup

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8289bba41d Correct markup
8289bba41d is described below

commit 8289bba41d79a365859bc90295c0b82c20f2745c
Author: Felix Schumacher 
AuthorDate: Wed Jan 4 21:19:41 2023 +0100

Correct markup
---
 xdocs/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index eb8dd6ec0d..ed84dd721d 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -135,7 +135,7 @@ Summary
 
 Listeners
 
-  57405741Fix Aggregated Graph component to cope 
with empty names of samplers
+  57405741Fix Aggregated Graph component to cope 
with empty names of samplers
 
 
 Timers, Assertions, Config, Pre-  Post-Processors



[jmeter] branch master updated: Fix Aggregated Graph component to cope with empty names of samplers/controllers

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2340756d31 Fix Aggregated Graph component to cope with empty names of 
samplers/controllers
2340756d31 is described below

commit 2340756d3162f5381c4e3708510992c079207cb9
Author: Felix Schumacher 
AuthorDate: Tue Nov 29 20:40:46 2022 +0100

Fix Aggregated Graph component to cope with empty names of 
samplers/controllers

Related to #5740
Closes #5741
---
 .../src/main/java/org/apache/jmeter/visualizers/AxisGraph.java   | 5 -
 xdocs/changes.xml| 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java 
b/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
index 5725557a00..e261b00cb0 100644
--- a/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
+++ b/src/components/src/main/java/org/apache/jmeter/visualizers/AxisGraph.java
@@ -351,12 +351,15 @@ public class AxisGraph extends JPanel {
 _maxLength = 3;
 }
 // if the "Title of Graph" is empty, we can assume some default
-if (_title.length() == 0 ) {
+if (_title.isEmpty()) {
 _title = JMeterUtils.getResString("aggregate_graph_title"); 
//$NON-NLS-1$
 }
 // if the labels are too long, they'll be "squeezed" to make the 
chart viewable.
 for (int i = 0; i < _xAxisLabels.length; i++) {
 String label = _xAxisLabels[i];
+if (label.isEmpty()) {
+label = "";
+}
 _xAxisLabels[i]=squeeze(label, _maxLength);
 }
 this.setPreferredSize(new Dimension(_width,_height));
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 3182bd1b0b..eb8dd6ec0d 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -135,6 +135,7 @@ Summary
 
 Listeners
 
+  57405741Fix Aggregated Graph component to cope 
with empty names of samplers
 
 
 Timers, Assertions, Config, Pre-  Post-Processors



[jmeter] 04/05: update xstream to 1.4.20 (from 1.4.19)

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit e1ba582ffa3862f7d5033eeef71161e313ab0b9a
Author: Stefan Seide 
AuthorDate: Wed Jan 4 10:36:54 2023 +0100

update xstream to 1.4.20 (from 1.4.19)
---
 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 baaffbd1e7..c250716fd8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -140,5 +140,5 @@ xml-apis.version=1.4.01
 xmlgraphics-commons.version=2.7
 xmlpull.version=1.1.3.1
 xpp3_min.version=1.1.4c
-xstream.version=1.4.19
+xstream.version=1.4.20
 wiremock-jre8.version=2.32.0
diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index 4dc7157fda..7702084ba2 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -134,4 +134,4 @@
 7188,xmlpull-1.1.3.1.jar
 1027759,xmlresolver-4.2.0-data.jar
 150259,xmlresolver-4.2.0.jar
-633140,xstream-1.4.19.jar
+644649,xstream-1.4.20.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 845b39f34e..f314bde430 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -118,6 +118,7 @@ Summary
   5725Update Apache commons-net to 3.9.0 (from 3.8.0)
   5731Update docs for changeCase function. 
UPPER is the default.
  Based on a patch by Ori Marko (orimarko at gmail.com)
+  5725Update XStream to 1.4.20 (from 1.4.19)
 
 
  



[jmeter] branch master updated (74d9040362 -> 3e424d774b)

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 74d9040362 added jsonpath string to assertion error message so it is 
easier to understand the error
 new ff1572273e Update jackson to 2.13.4.2 with new gpg key used for signing
 new b0284c Update jsoup to 1.15.3 and tika parser to 1.28.5
 new 62124ca17d Update Apache commons-net to 3.9.0 and fix changes list
 new e1ba582ffa update xstream to 1.4.20 (from 1.4.19)
 new 3e424d774b add pr number to changes.xml

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checksum.xml|  2 +-
 gradle.properties   | 12 ++--
 src/dist/src/dist/expected_release_jars.csv | 16 
 xdocs/changes.xml   |  8 
 4 files changed, 23 insertions(+), 15 deletions(-)



[jmeter] 05/05: add pr number to changes.xml

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 3e424d774be166bf1e1c921552ad8457ee6f711d
Author: Stefan Seide 
AuthorDate: Thu Nov 3 20:22:57 2022 +0100

add pr number to changes.xml

Closes #5725
---
 xdocs/changes.xml | 18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index f314bde430..3182bd1b0b 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -107,17 +107,12 @@ Summary
   5718Update Apache commons-text to 1.10.0 (from 1.9)
   5731Update docs for changeCase function. 
UPPER is the default.
  Based on a patch by Ori Marko (orimarko at gmail.com)
-  Update Jackson Core to 2.13.4 (from 2.13.2)
-  Update Jackson Databind to 2.13.4.2 (from 2.13.4.2)
-  Update Tika Parser to 1.28.5 (from 1.28.3)
-  Update JSoup to 1.15.3 (from 1.15.1)
-  5725Update Jackson Core to 2.13.4 (from 2.13.2)
-  5725Update Jackson Databind to 2.13.4.2 (from 
2.13.2.2)
-  5725Update Tika Parser to 1.28.5 (from 1.28.3)
-  5725Update JSoup to 1.15.3 (from 1.15.1)
-  5725Update Apache commons-net to 3.9.0 (from 3.8.0)
-  5731Update docs for changeCase function. 
UPPER is the default.
- Based on a patch by Ori Marko (orimarko at gmail.com)
+  5718Update Apache commons-text to 1.10.0 (from 1.9)
+  5725Update Jackson Core to 2.13.4 (from 2.13.2)
+  5725Update Jackson Databind to 2.13.4.2 (from 2.13.2.2)
+  5725Update Tika Parser to 1.28.5 (from 1.28.3)
+  5725Update JSoup to 1.15.3 (from 1.15.1)
+  5725Update Apache commons-net to 3.9.0 (from 3.8.0)
   5725Update XStream to 1.4.20 (from 1.4.19)
 
 
@@ -177,6 +172,7 @@ Summary
 
 
   Kai Lehmann (klehmann at aservo.com)
+  Stefan Seide (stefan at trilobyte-se.de)
 
 We also thank bug reporters who helped us improve JMeter.
 



[jmeter] 01/05: Update jackson to 2.13.4.2 with new gpg key used for signing

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit ff1572273ec2dfff463b845c1666a0a3e745803c
Author: Stefan Seide 
AuthorDate: Thu Nov 3 20:11:24 2022 +0100

Update jackson to 2.13.4.2 with new gpg key used for signing
---
 checksum.xml| 2 +-
 gradle.properties   | 4 ++--
 src/dist/src/dist/expected_release_jars.csv | 6 +++---
 xdocs/changes.xml   | 2 ++
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/checksum.xml b/checksum.xml
index 9b5bbf4ab2..7d7cce2df7 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -8,7 +8,7 @@
 
 
 
-
+
 
 
 
diff --git a/gradle.properties b/gradle.properties
index 4c810271a8..161383e63c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -98,8 +98,8 @@ httpclient.version=4.5.13
 httpcore-nio.version=4.4.15
 httpcore.version=4.4.15
 httpmime.version=4.5.13
-jackson.version=2.13.3
-jackson-databind.version=2.13.2.2
+jackson.version=2.13.4
+jackson-databind.version=2.13.4.2
 javax.activation.version=1.2.0
 jcharts.version=0.7.5
 jdom.version=1.1.3
diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index be292924c5..292373756e 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -69,9 +69,9 @@
 328324,httpcore-4.4.15.jar
 369486,httpcore-nio-4.4.15.jar
 41790,httpmime-4.5.13.jar
-75714,jackson-annotations-2.13.3.jar
-374895,jackson-core-2.13.3.jar
-1536542,jackson-databind-2.13.3.jar
+75717,jackson-annotations-2.13.4.jar
+374895,jackson-core-2.13.4.jar
+1531681,jackson-databind-2.13.4.2.jar
 78030,javax.activation-1.2.0.jar
 142391,jcharts-0.7.5.jar
 16555,jcl-over-slf4j-1.7.36.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index e05d77416e..122d6105e8 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -107,6 +107,8 @@ Summary
   5718Update Apache commons-text to 1.10.0 (from 1.9)
   5731Update docs for changeCase function. 
UPPER is the default.
  Based on a patch by Ori Marko (orimarko at gmail.com)
+  Update Jackson Core to 2.13.4 (from 2.13.2)
+  Update Jackson Databind to 2.13.4.2 (from 2.13.4.2)
 
 
  



[jmeter] 03/05: Update Apache commons-net to 3.9.0 and fix changes list

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 62124ca17d02ddc8fbc15c348dc4b166c857bc46
Author: Stefan Seide 
AuthorDate: Thu Dec 22 12:04:18 2022 +0100

Update Apache commons-net to 3.9.0 and fix changes list
---
 checksum.xml| 2 +-
 gradle.properties   | 2 +-
 src/dist/src/dist/expected_release_jars.csv | 2 +-
 xdocs/changes.xml   | 7 +++
 4 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/checksum.xml b/checksum.xml
index 7d7cce2df7..a977f79de4 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -7,8 +7,8 @@
   
 
 
-
 
+
 
 
 
diff --git a/gradle.properties b/gradle.properties
index a8519bd41b..baaffbd1e7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -77,7 +77,7 @@ commons-lang.version=2.6
 commons-lang3.version=3.12.0
 commons-logging.version=1.2
 commons-math3.version=3.6.1
-commons-net.version=3.8.0
+commons-net.version=3.9.0
 commons-pool2.version=2.11.1
 commons-text.version=1.10.0
 darklaf.version=2.7.3
diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index beb0ab53f5..4dc7157fda 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -35,7 +35,7 @@
 587402,commons-lang3-3.12.0.jar
 61829,commons-logging-1.2.jar
 2213560,commons-math3-3.6.1.jar
-307305,commons-net-3.8.0.jar
+316431,commons-net-3.9.0.jar
 145516,commons-pool2-2.11.1.jar
 238400,commons-text-1.10.0.jar
 1547509,darklaf-core-2.7.3.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 46097082a6..845b39f34e 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -111,6 +111,13 @@ Summary
   Update Jackson Databind to 2.13.4.2 (from 2.13.4.2)
   Update Tika Parser to 1.28.5 (from 1.28.3)
   Update JSoup to 1.15.3 (from 1.15.1)
+  5725Update Jackson Core to 2.13.4 (from 2.13.2)
+  5725Update Jackson Databind to 2.13.4.2 (from 
2.13.2.2)
+  5725Update Tika Parser to 1.28.5 (from 1.28.3)
+  5725Update JSoup to 1.15.3 (from 1.15.1)
+  5725Update Apache commons-net to 3.9.0 (from 3.8.0)
+  5731Update docs for changeCase function. 
UPPER is the default.
+ Based on a patch by Ori Marko (orimarko at gmail.com)
 
 
  



[jmeter] 02/05: Update jsoup to 1.15.3 and tika parser to 1.28.5

2023-01-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit b0284c8da4099f39aa3dc106526c717e06ea
Author: Stefan Seide 
AuthorDate: Thu Nov 3 20:12:12 2022 +0100

Update jsoup to 1.15.3 and tika parser to 1.28.5
---
 gradle.properties   | 4 ++--
 src/dist/src/dist/expected_release_jars.csv | 6 +++---
 xdocs/changes.xml   | 2 ++
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 161383e63c..a8519bd41b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -109,7 +109,7 @@ jmespath-jackson.version=0.5.1
 jodd.version=5.0.13
 json-path.version=2.7.0
 json-smart.version=2.4.8
-jsoup.version=1.15.1
+jsoup.version=1.15.3
 jtidy.version=r938
 junit4.version=4.13.2
 junit5.version=5.8.2
@@ -133,7 +133,7 @@ slf4j.version=1.7.36
 spock-core.version=2.2-groovy-3.0
 springframework.version=4.3.17.RELEASE
 svgSalamander.version=1.1.2.4
-tika.version=1.28.3
+tika.version=1.28.5
 xalan.version=2.7.2
 xercesImpl.version=2.12.2
 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 292373756e..beb0ab53f5 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -83,7 +83,7 @@
 26047,jodd-props-5.0.13.jar
 271159,json-path-2.7.0.jar
 119545,json-smart-2.4.8.jar
-429123,jsoup-1.15.1.jar
+438018,jsoup-1.15.3.jar
 249924,jtidy-r938.jar
 384581,junit-4.13.2.jar
 32033,kotlin-logging-jvm-2.0.5.jar
@@ -123,8 +123,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
-735701,tika-core-1.28.3.jar
-1587751,tika-parsers-1.28.3.jar
+736051,tika-core-1.28.5.jar
+1588025,tika-parsers-1.28.5.jar
 174661,vis-svg-portable-jvm-2.2.1.jar
 3154938,xalan-2.7.2.jar
 1446149,xercesImpl-2.12.2.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 122d6105e8..46097082a6 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -109,6 +109,8 @@ Summary
  Based on a patch by Ori Marko (orimarko at gmail.com)
   Update Jackson Core to 2.13.4 (from 2.13.2)
   Update Jackson Databind to 2.13.4.2 (from 2.13.4.2)
+  Update Tika Parser to 1.28.5 (from 1.28.3)
+  Update JSoup to 1.15.3 (from 1.15.1)
 
 
  



[jmeter] branch master updated: Allow SampleResult#setEndTime be set in JSR223Sampler

2022-11-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2da0eb558c Allow SampleResult#setEndTime be set in JSR223Sampler
2da0eb558c is described below

commit 2da0eb558c53ad0e4369fe310e3b460ba11d502f
Author: Felix Schumacher 
AuthorDate: Tue Nov 29 20:52:36 2022 +0100

Allow SampleResult#setEndTime be set in JSR223Sampler

Fixes #5733 and closes #5736
---
 .../protocol/java/sampler/JSR223Sampler.java   | 10 +++--
 .../protocol/java/sampler/JSR223SamplerTest.java   | 46 ++
 xdocs/changes.xml  |  1 +
 3 files changed, 53 insertions(+), 4 deletions(-)

diff --git 
a/src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/sampler/JSR223Sampler.java
 
b/src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/sampler/JSR223Sampler.java
index 085e6e1e18..e68eb36ac4 100644
--- 
a/src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/sampler/JSR223Sampler.java
+++ 
b/src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/sampler/JSR223Sampler.java
@@ -18,7 +18,7 @@
 package org.apache.jmeter.protocol.java.sampler;
 
 import java.io.IOException;
-import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
 @TestElementMetadata(labelResource = "displayName")
 public class JSR223Sampler extends JSR223TestElement implements Cloneable, 
Sampler, TestBean, ConfigMergabilityIndicator {
 private static final Set APPLIABLE_CONFIG_CLASSES = new HashSet<>(
-Arrays.asList("org.apache.jmeter.config.gui.SimpleConfigGui"));
+
Collections.singletonList("org.apache.jmeter.config.gui.SimpleConfigGui"));
 
 private static final long serialVersionUID = 235L;
 
@@ -58,7 +58,7 @@ public class JSR223Sampler extends JSR223TestElement 
implements Cloneable, Sampl
 result.setResponseMessageOK();
 
 final String filename = getFilename();
-if (filename.length() > 0){
+if (!filename.isEmpty()){
 result.setSamplerData("File: "+filename);
 } else {
 result.setSamplerData(getScript());
@@ -79,7 +79,9 @@ public class JSR223Sampler extends JSR223TestElement 
implements Cloneable, Sampl
 result.setResponseCode("500"); // $NON-NLS-1$
 result.setResponseMessage(e.toString());
 }
-result.sampleEnd();
+if (result.getEndTime() == 0) {
+result.sampleEnd();
+}
 return result;
 }
 
diff --git 
a/src/protocol/java/src/test/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerTest.java
 
b/src/protocol/java/src/test/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerTest.java
new file mode 100644
index 00..f2478c7e4d
--- /dev/null
+++ 
b/src/protocol/java/src/test/java/org/apache/jmeter/protocol/java/sampler/JSR223SamplerTest.java
@@ -0,0 +1,46 @@
+/*
+ * 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.jmeter.protocol.java.sampler;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.apache.jmeter.samplers.SampleResult;
+import org.junit.jupiter.api.Test;
+
+class JSR223SamplerTest {
+
+@Test
+void sampleWithEndTimeSet() {
+JSR223Sampler sampler = new JSR223Sampler();
+sampler.setName("jsr223Test");
+sampler.setScript("SampleResult.setEndTime(42); 'OK'");
+sampler.setScriptLanguage("groovy");
+SampleResult sampleResult = sampler.sample(null);
+assertEquals(42, sampleResult.getEndTime());
+}
+
+@Test
+void sampleWithoutEndTimeSet() {
+JSR223Sampler sampler = new JSR223Sampler();
+sampler.setName("jsr223Test");
+sampler.setScript("'OK'");
+sampler.setScriptLanguage("groovy");
+SampleResult sampleResult = sampler.sample(null);
+ass

[jmeter] branch master updated: Make note more prominent in docs

2022-11-19 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8fba9d96aa Make note more prominent in docs
8fba9d96aa is described below

commit 8fba9d96aa4b9188b4677fa93dc41c6221d342bf
Author: Felix Schumacher 
AuthorDate: Sat Nov 19 17:26:31 2022 +0100

Make note more prominent in docs
---
 xdocs/usermanual/component_reference.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xdocs/usermanual/component_reference.xml 
b/xdocs/usermanual/component_reference.xml
index 73d0c2619a..f78ae49b46 100644
--- a/xdocs/usermanual/component_reference.xml
+++ b/xdocs/usermanual/component_reference.xml
@@ -4649,8 +4649,8 @@ These can be used anywhere within the expression and 
remain in effect until over
 HTTP Responses with statuses in the 4xx and 
5xx ranges are normally
 regarded as unsuccessful.
 The "Ignore status" checkbox can be used to set 
the status successful before performing further checks.
-Note that this will have the effect of clearing any previous 
assertion failures,
-so make sure that this is only set on the first assertion.
+Note that this will have the effect of clearing any 
previous assertion failures,
+so make sure that this is only set on the first 
assertion.
 
 Indicates how 
the text being tested
 is checked against the pattern.



[jmeter] 02/02: Change naming the default to inner text

2022-11-19 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit db847c10271aecf9b59eb7a8008a78e242618145
Author: Felix Schumacher 
AuthorDate: Sat Nov 19 13:44:24 2022 +0100

Change naming the default to inner text

The long description in the required field let to a line
break in my browser, where the complete text rendered in
the title column.

We might think about a special default attribute for the
arguments, that could be used to specify a default value.

Closes #5731
---
 xdocs/changes.xml  | 2 ++
 xdocs/usermanual/functions.xml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 19b13dceb0..a900cf48e2 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -105,6 +105,8 @@ Summary
   5710Add GitHub Issue templates
   5713Update Spock to 2.2-groovy-3.0 (from 2.1-groovy-3.0)
   5718Update Apache commons-text to 1.10.0 (from 1.9)
+  5731Update docs for changeCase function. 
UPPER is the default.
+ Based on a patch by Ori Marko (orimarko at gmail.com)
 
 
  
diff --git a/xdocs/usermanual/functions.xml b/xdocs/usermanual/functions.xml
index 12641941c8..23fbe8a3c0 100644
--- a/xdocs/usermanual/functions.xml
+++ b/xdocs/usermanual/functions.xml
@@ -1701,7 +1701,7 @@ returns:
 
 The String
 which case will be changed
-
+
 The mode to be used to change case, for example for ab-CD 
eF:
 
 UPPER result as AB-CD EF
@@ -1709,6 +1709,7 @@ returns:
 CAPITALIZE result as Ab-CD eF
 
 change case mode is case insensitive
+If no mode is given, UPPER is used as default.
 
 The name of the 
variable to set.
 



[jmeter] 01/02: UPPER is the default case for changeCase

2022-11-19 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 3a1e7c5536586225880356aac8c004b3d1ba3134
Author: orimarko 
AuthorDate: Thu Nov 10 13:44:26 2022 +0200

UPPER is the default case for changeCase
---
 xdocs/usermanual/functions.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/usermanual/functions.xml b/xdocs/usermanual/functions.xml
index 68b7ff2131..12641941c8 100644
--- a/xdocs/usermanual/functions.xml
+++ b/xdocs/usermanual/functions.xml
@@ -1701,7 +1701,7 @@ returns:
 
 The String
 which case will be changed
-
+
 The mode to be used to change case, for example for ab-CD 
eF:
 
 UPPER result as AB-CD EF



[jmeter] branch master updated (da6efde33e -> db847c1027)

2022-11-19 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from da6efde33e Update Bugzilla -> GitHub issues in the contribution 
documentation
 new 3a1e7c5536 UPPER is the default case for changeCase
 new db847c1027 Change naming the default to inner text

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 xdocs/changes.xml  | 2 ++
 xdocs/usermanual/functions.xml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)



[jmeter] branch master updated: Redirect Bing to the real download URL

2022-10-20 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6dec35fdf5 Redirect Bing to the real download URL
6dec35fdf5 is described below

commit 6dec35fdf58a4bd075c37fdb574c5e6dbbeb5f3c
Author: Felix Schumacher 
AuthorDate: Thu Oct 20 18:58:03 2022 +0200

Redirect Bing to the real download URL
---
 xdocs/.htaccess | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xdocs/.htaccess b/xdocs/.htaccess
index 7109433352..a30d89339d 100644
--- a/xdocs/.htaccess
+++ b/xdocs/.htaccess
@@ -15,6 +15,9 @@
 
 RewriteEngine On
 
+# Try to get Bing away from the old download location
+RewriteRule ^download_jmeter(\.html)?$ /download_jmeter.cgi [R]
+
 # Redirect http to https
 # From Cordova PMC Member raphinesse
 # https://s.apache.org/An8s
@@ -29,4 +32,5 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
-RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R,L]
+
+



[jmeter] branch master updated: Update Apache commons-text to 1.10.0 (from 1.9)

2022-10-20 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new fb557d548d Update Apache commons-text to 1.10.0 (from 1.9)
fb557d548d is described below

commit fb557d548d829812591d041fe8218f87d857e0c5
Author: Felix Schumacher 
AuthorDate: Thu Oct 20 18:53:45 2022 +0200

Update Apache commons-text to 1.10.0 (from 1.9)

The CVE (https://nvd.nist.gov/vuln/detail/CVE-2022-42889)
doesn't concern us, as we are not using the affected class StringSubstitutor
in our code.

But it is always a good idea, to keep our dependencies up to date.

Fixes #5718
---
 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 87324f2475..4c810271a8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -79,7 +79,7 @@ commons-logging.version=1.2
 commons-math3.version=3.6.1
 commons-net.version=3.8.0
 commons-pool2.version=2.11.1
-commons-text.version=1.9
+commons-text.version=1.10.0
 darklaf.version=2.7.3
 darklaf.extensions.version=0.3.4
 dec.version=0.1.2
diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index c032b63b41..be292924c5 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -37,7 +37,7 @@
 2213560,commons-math3-3.6.1.jar
 307305,commons-net-3.8.0.jar
 145516,commons-pool2-2.11.1.jar
-216211,commons-text-1.9.jar
+238400,commons-text-1.10.0.jar
 1547509,darklaf-core-2.7.3.jar
 20650,darklaf-extensions-rsyntaxarea-0.3.4.jar
 93477,darklaf-macos-2.7.3.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index cf5e9f23bb..19b13dceb0 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -104,6 +104,7 @@ Summary
   725Add Chinese Simplified Translation for Open Model Thread 
Group
   5710Add GitHub Issue templates
   5713Update Spock to 2.2-groovy-3.0 (from 2.1-groovy-3.0)
+  5718Update Apache commons-text to 1.10.0 (from 1.9)
 
 
  



[jmeter-site] branch asf-site updated: No slash in front of our URLs in rewrite rules

2022-10-11 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 4746636  No slash in front of our URLs in rewrite rules
4746636 is described below

commit 4746636b33f1367aceb9b74d0509e9fb69308189
Author: Felix Schumacher 
AuthorDate: Tue Oct 11 16:56:11 2022 +0200

No slash in front of our URLs in rewrite rules

we are relative to the location of the .htaccess, it seems.
---
 .htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.htaccess b/.htaccess
index 9b85b91..a30d893 100644
--- a/.htaccess
+++ b/.htaccess
@@ -16,7 +16,7 @@
 RewriteEngine On
 
 # Try to get Bing away from the old download location
-RewriteRule ^/download_jmeter(\.html)?$ /download_jmeter.cgi [R]
+RewriteRule ^download_jmeter(\.html)?$ /download_jmeter.cgi [R]
 
 # Redirect http to https
 # From Cordova PMC Member raphinesse



[jmeter-site] branch asf-site updated: The .html should be optional for the redirect match

2022-10-11 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 693dabb  The .html should be optional for the redirect match
693dabb is described below

commit 693dabbb6bbcb68a5642dfc4e859c55b2ab12ae0
Author: Felix Schumacher 
AuthorDate: Tue Oct 11 16:32:52 2022 +0200

The .html should be optional for the redirect match
---
 .htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.htaccess b/.htaccess
index ddb4a1d..9b85b91 100644
--- a/.htaccess
+++ b/.htaccess
@@ -16,7 +16,7 @@
 RewriteEngine On
 
 # Try to get Bing away from the old download location
-RewriteRule ^/download_jmeter(\.html)$ /download_jmeter.cgi [R]
+RewriteRule ^/download_jmeter(\.html)?$ /download_jmeter.cgi [R]
 
 # Redirect http to https
 # From Cordova PMC Member raphinesse



[jmeter-site] branch asf-site updated: Accomodate for content negotiation

2022-10-11 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 1e89bcd  Accomodate for content negotiation
1e89bcd is described below

commit 1e89bcdff8fd89b6cba7686ca7b4656fca4d5e92
Author: Felix Schumacher 
AuthorDate: Tue Oct 11 16:30:29 2022 +0200

Accomodate for content negotiation
---
 .htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.htaccess b/.htaccess
index 723f188..ddb4a1d 100644
--- a/.htaccess
+++ b/.htaccess
@@ -16,7 +16,7 @@
 RewriteEngine On
 
 # Try to get Bing away from the old download location
-RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R]
+RewriteRule ^/download_jmeter(\.html)$ /download_jmeter.cgi [R]
 
 # Redirect http to https
 # From Cordova PMC Member raphinesse



[jmeter-site] branch asf-site updated: Try rule for Bing first

2022-10-10 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 3f46594  Try rule for Bing first
3f46594 is described below

commit 3f46594669a960553a7ea00d4033d3273f1f5ece
Author: Felix Schumacher 
AuthorDate: Mon Oct 10 11:47:07 2022 +0200

Try rule for Bing first

Maybe other rule with L flaf hid our wish
---
 .htaccess | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.htaccess b/.htaccess
index 5aa87f5..723f188 100644
--- a/.htaccess
+++ b/.htaccess
@@ -15,6 +15,9 @@
 
 RewriteEngine On
 
+# Try to get Bing away from the old download location
+RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R]
+
 # Redirect http to https
 # From Cordova PMC Member raphinesse
 # https://s.apache.org/An8s
@@ -29,6 +32,5 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
-RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R,L]
 
 



[jmeter-site] branch asf-site updated: Add R to RewriteRule

2022-10-10 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 9c3cf11  Add R to RewriteRule
9c3cf11 is described below

commit 9c3cf11de6c47f97b46c70071babdb02de92d905
Author: Felix Schumacher 
AuthorDate: Mon Oct 10 08:24:25 2022 +0200

Add R to RewriteRule

we really want to Redirect
---
 .htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.htaccess b/.htaccess
index 7805cb3..5aa87f5 100644
--- a/.htaccess
+++ b/.htaccess
@@ -29,6 +29,6 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
-RewriteRule ^/download_jmeter$ /download_jmeter.cgi [L]
+RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R,L]
 
 



[jmeter] branch master updated: Add missing R to RewriteRule

2022-10-10 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ce2f0fa6a1 Add missing R to RewriteRule
ce2f0fa6a1 is described below

commit ce2f0fa6a14db06c0b7f5c46ff4209b70f347ae1
Author: Felix Schumacher 
AuthorDate: Mon Oct 10 08:22:31 2022 +0200

Add missing R to RewriteRule
---
 xdocs/.htaccess | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/.htaccess b/xdocs/.htaccess
index 3798183641..7109433352 100644
--- a/xdocs/.htaccess
+++ b/xdocs/.htaccess
@@ -29,4 +29,4 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
-RewriteRule ^/download_jmeter$ /download_jmeter.cgi [L]
+RewriteRule ^/download_jmeter$ /download_jmeter.cgi [R,L]



[jmeter-site] branch asf-site updated: Add a redirect to download_jmeter.cgi

2022-10-05 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

fschumacher pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/jmeter-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new b1c541a  Add a redirect to download_jmeter.cgi
b1c541a is described below

commit b1c541a74fd5e921f02be2cdc5077a6997682026
Author: Felix Schumacher 
AuthorDate: Wed Oct 5 21:09:49 2022 +0200

Add a redirect to download_jmeter.cgi

So that bing might find the correct URL
---
 .htaccess | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.htaccess b/.htaccess
index 7fe5e55..7805cb3 100644
--- a/.htaccess
+++ b/.htaccess
@@ -29,3 +29,6 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
+RewriteRule ^/download_jmeter$ /download_jmeter.cgi [L]
+
+



[jmeter] branch master updated: Try to fix #5671 with a redirect

2022-10-05 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 452bebd2c6 Try to fix #5671 with a redirect
452bebd2c6 is described below

commit 452bebd2c63ba71e5ce61b053667a9c751199b9f
Author: Felix Schumacher 
AuthorDate: Wed Oct 5 21:07:55 2022 +0200

Try to fix #5671 with a redirect
---
 xdocs/.htaccess | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xdocs/.htaccess b/xdocs/.htaccess
index 7fe5e555ab..3798183641 100644
--- a/xdocs/.htaccess
+++ b/xdocs/.htaccess
@@ -29,3 +29,4 @@ RewriteCond %{HTTPS} !=on
 # Redirect to https version
 RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L]
 
+RewriteRule ^/download_jmeter$ /download_jmeter.cgi [L]



[jmeter] branch master updated: Add test for broken xpath in XPathUtil#selectNodeList

2022-07-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b73f69074f Add test for broken xpath in XPathUtil#selectNodeList
b73f69074f is described below

commit b73f69074f8b3b5d71767ab0fedb52f16a1e55d6
Author: Felix Schumacher 
AuthorDate: Sat Jul 23 17:21:10 2022 +0200

Add test for broken xpath in XPathUtil#selectNodeList
---
 .../src/test/java/org/apache/jmeter/util/XPathUtilTest.java   | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java 
b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
index dd02987a6f..d916487f10 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
@@ -20,6 +20,7 @@ package org.apache.jmeter.util;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -277,4 +278,14 @@ public class XPathUtilTest {
 assertEquals("one", e0.getTextContent());
 assertEquals("two", e1.getTextContent());
 }
+
+@Test()
+public void testSelectNodeListWithInvalidXPath() throws Exception {
+String responseData = 
"onetwo";
+Document testDoc = XPathUtil.makeDocument(
+new 
ByteArrayInputStream(responseData.getBytes(StandardCharsets.UTF_8)), false, 
false, false, false,
+false, false, false, false, false);
+String xpathquery = "<";
+assertThrows(TransformerException.class, () -> 
XPathUtil.selectNodeList(testDoc, xpathquery));
+}
 }



[jmeter] branch master updated (cbcf41fc84 -> 936e275e5a)

2022-07-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from cbcf41fc84 Restructure tests for XPathUtil
 new 3d49c6efb7 Update XPathUtilTest.java
 new 936e275e5a Update XPathUtilTest.java

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/jmeter/util/XPathUtilTest.java | 23 ++
 1 file changed, 23 insertions(+)



[jmeter] 02/02: Update XPathUtilTest.java

2022-07-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 936e275e5a7689284bb8ec63b719221090a6163c
Author: PJ Fanning 
AuthorDate: Sat Jul 23 16:13:11 2022 +0100

Update XPathUtilTest.java
---
 .../test/java/org/apache/jmeter/util/XPathUtilTest.java | 17 +
 1 file changed, 17 insertions(+)

diff --git a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java 
b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
index 89f1f4dc76..dd02987a6f 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
@@ -45,6 +45,8 @@ import org.junit.jupiter.params.provider.Arguments;
 import org.junit.jupiter.params.provider.CsvSource;
 import org.junit.jupiter.params.provider.MethodSource;
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
 import net.sf.saxon.s9api.Processor;
@@ -260,4 +262,19 @@ public class XPathUtilTest {
 assertEquals(1, matchs.size());
 assertNull(matchs.get(0));
 }
+
+@Test
+public void testSelectNodeList() throws ParserConfigurationException, 
SAXException, IOException, TidyException, TransformerException {
+String responseData = 
"onetwo";
+Document testDoc = XPathUtil.makeDocument(
+new 
ByteArrayInputStream(responseData.getBytes(StandardCharsets.UTF_8)), false, 
false, false, false,
+false, false, false, false, false);
+String xpathquery = "/book/page";
+NodeList nodeList = XPathUtil.selectNodeList(testDoc, xpathquery);
+assertEquals(2, nodeList.getLength());
+Element e0 = (Element) nodeList.item(0);
+Element e1 = (Element) nodeList.item(1);
+assertEquals("one", e0.getTextContent());
+assertEquals("two", e1.getTextContent());
+}
 }



[jmeter] 01/02: Update XPathUtilTest.java

2022-07-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 3d49c6efb781035ab23e14127502e765abdb2534
Author: PJ Fanning 
AuthorDate: Sat Jul 23 15:32:28 2022 +0100

Update XPathUtilTest.java
---
 src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java 
b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
index c258cba5d3..89f1f4dc76 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
@@ -19,6 +19,7 @@ package org.apache.jmeter.util;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -251,7 +252,12 @@ public class XPathUtilTest {
 assertEquals("two", matchs.get(1));
 matchs=new ArrayList<>();
 XPathUtil.putValuesForXPathInList(testDoc, xpathquery, matchs, false);
+assertEquals(2, matchs.size());
 assertEquals("one", matchs.get(0));
 assertEquals("two", matchs.get(1));
+matchs=new ArrayList<>();
+XPathUtil.putValuesForXPathInList(testDoc, "/book/a", matchs, false);
+assertEquals(1, matchs.size());
+assertNull(matchs.get(0));
 }
 }



[jmeter] branch master updated: Restructure tests for XPathUtil

2022-07-23 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new cbcf41fc84 Restructure tests for XPathUtil
cbcf41fc84 is described below

commit cbcf41fc84fd637a5e063e8de88cc746fa884b06
Author: Felix Schumacher 
AuthorDate: Sat Jul 23 15:19:15 2022 +0200

Restructure tests for XPathUtil

Use a dummy printstream instead of null to ignore errors on System.err.
Use ParameterizedTests to make test methods more concise.
---
 .../java/org/apache/jmeter/util/XPathUtilTest.java | 174 +
 1 file changed, 76 insertions(+), 98 deletions(-)

diff --git a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java 
b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
index e3c1af6519..c258cba5d3 100644
--- a/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/util/XPathUtilTest.java
@@ -19,16 +19,16 @@ package org.apache.jmeter.util;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.PrintStream;
 import java.io.StringReader;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Stream;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.FactoryConfigurationError;
@@ -39,6 +39,10 @@ import javax.xml.transform.stream.StreamSource;
 import org.apache.jmeter.assertions.AssertionResult;
 import org.hamcrest.CoreMatchers;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.CsvSource;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
@@ -115,29 +119,25 @@ public class XPathUtilTest {
 assertEquals(0,matchStrings.size());
 }
 
-@Test
-public void testnamespacesParse() {
-String namespaces = "donald=duck";
+static Stream namespaceData() {
+return Stream.of(
+Arguments.of("donald=duck", "donald", "duck", 0),
+Arguments.of("donald=duck\nmickey=mouse", "donald", "duck", 0),
+Arguments.of("donald=duck\nmickey=mouse", "mickey", "mouse", 
1),
+Arguments.of("donald=duck\n\n\nmickey=mouse", "mickey", 
"mouse", 1),
+Arguments.of("donald=duck\n\n\nmickey=mouse", "donald", 
"duck", 0),
+Arguments.of("donald=duck\n \n   \nmickey=mouse\n   \n\n", 
"donald", "duck", 0),
+Arguments.of("donald=duck\n \n   \nmickey=mouse\n   \n\n", 
"mickey", "mouse", 1),
+Arguments.of("   \n \ndonald=duck\n \n   \nmickey=mouse\n  
 \n\n", "donald", "duck", 0),
+Arguments.of("   \n \ndonald=duck\n \n   \nmickey=mouse\n  
 \n\n", "mickey", "mouse", 1)
+);
+}
+@ParameterizedTest
+@MethodSource("namespaceData")
+public void testnamespacesParse(String namespaces, String key, String 
value, int position) {
 List test = XPathUtil.namespacesParse(namespaces);
-assertEquals("donald",test.get(0)[0]);
-assertEquals("duck",test.get(0)[1]);
-
-namespaces = "donald=duck\nmickey=mouse";
-test = XPathUtil.namespacesParse(namespaces);
-assertEquals("donald",test.get(0)[0]);
-assertEquals("duck",test.get(0)[1]);
-assertEquals("mickey",test.get(1)[0]);
-assertEquals("mouse",test.get(1)[1]);
-
-namespaces = "donald=duck\n\n\nmickey=mouse";
-test = XPathUtil.namespacesParse(namespaces);
-assertEquals("mickey",test.get(1)[0]);
-assertEquals("mouse",test.get(1)[1]);
-
-namespaces = "geo=patate\n   \n   \n\nmickey=mouse\n\n  \n";
-test = XPathUtil.namespacesParse(namespaces);
-assertEquals("mickey",test.get(1)[0]);
-assertEquals("mouse",test.get(1)[1]);
+assertEquals(key,test.get(position)[0]);
+assertEquals(value, test.get(position)[1]);
 }
 
 @Test
@@ -163,64 +163,44 @@ public class XPathUtilTest {
 @Test
 public void testForma

[jmeter] branch master updated: Make failing tests run again and add more tests

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 157db3679a Make failing tests run again and add more tests
157db3679a is described below

commit 157db3679a5ed14e97f4b7dd59f29b395217cd48
Author: Felix Schumacher 
AuthorDate: Sat Jul 9 14:48:17 2022 +0200

Make failing tests run again and add more tests

Bugzilla Id: 66140
---
 .../apache/jmeter/report/core/SampleMetaDataParser.java   |  5 +++--
 .../jmeter/report/core/SampleMetadataParserSpec.groovy| 15 +++
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
index be00c516b5..b798656efd 100644
--- 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
+++ 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
@@ -39,9 +39,10 @@ public class SampleMetaDataParser {
 // word followed by 0 or more repeats of (non-word char + word)
 // where the non-word char (\2) is the same
 // e.g. abc|def|ghi but not abd|def~ghi
-.compile("\\w+((\\W)\\w+)?(\\2\\w+)*(\\2\"\\w+\")*" // $NON-NLS-1$
+.compile("\\w+((\\W)[\\w ]+)?(\\2[\\w ]+)*(\\2\"[\\w ]+\")*" // 
$NON-NLS-1$
 // last entries may be quoted strings
 );
+private static final Pattern ALL_WORD_CHARS = Pattern.compile("^\\w+$");
 
 public SampleMetaDataParser(char separator) {
 this.separator = separator;
@@ -49,7 +50,7 @@ public class SampleMetaDataParser {
 
 public SampleMetadata parse(String headRow) {
 char useSep = separator;
-if (headRow.indexOf(useSep) < 0) {
+if (headRow.indexOf(useSep) < 0 && 
!ALL_WORD_CHARS.matcher(headRow).matches()) {
 Matcher matcher = DELIMITER_PATTERN.matcher(headRow);
 if (matcher.matches()) {
 String guessedSep = matcher.group(2);
diff --git 
a/src/core/src/test/groovy/org/apache/jmeter/report/core/SampleMetadataParserSpec.groovy
 
b/src/core/src/test/groovy/org/apache/jmeter/report/core/SampleMetadataParserSpec.groovy
index 180fce0d7d..fe1ed72413 100644
--- 
a/src/core/src/test/groovy/org/apache/jmeter/report/core/SampleMetadataParserSpec.groovy
+++ 
b/src/core/src/test/groovy/org/apache/jmeter/report/core/SampleMetadataParserSpec.groovy
@@ -40,4 +40,19 @@ class SampleMetadataParserSpec extends Specification {
 ','   | "abcdef"  | ["abcdef"]
 }
 
+def "Parse headers (#headers) with wrong separator (#separator) and get 
(#expectedColumns)"() {
+given:
+def sut = new SampleMetaDataParser(separator as char)
+when:
+def columns = sut.parse(headers).columns
+then:
+columns == expectedColumns
+where:
+separator | headers   | expectedColumns
+','   | "a;b;c;d;e"   | ["a", "b", "c", "d", "e"]
+','   | "a|b|c|d|e"   | ["a", "b", "c", "d", "e"]
+','   | "aa|bb|cc|dd|eef" | ["aa", "bb", "cc", "dd", "eef"]
+','   | "a"   | ["a", "b", "c", "d", "e"]
+','   | "a\tb c\td\te"| ["a", "b c", "d", "e"]
+}
 }



[jmeter] branch master updated: Order of imports

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b46786cd57 Order of imports
b46786cd57 is described below

commit b46786cd57ffa456e247c8ecb81da65679b01acd
Author: Felix Schumacher 
AuthorDate: Sat Jul 9 14:21:32 2022 +0200

Order of imports
---
 .../java/org/apache/jmeter/report/core/SampleMetaDataParser.java| 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
index bc96a660d5..be00c516b5 100644
--- 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
+++ 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
@@ -17,12 +17,12 @@
 
 package org.apache.jmeter.report.core;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * Simple parser to get a {@link SampleMetadata} instance
  *



[jmeter] 02/02: Don't generate same string twice.

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 8d53bb9491c629696b48b233605b3d70036f611a
Author: Felix Schumacher 
AuthorDate: Sat Jul 9 14:15:11 2022 +0200

Don't generate same string twice.
---
 .../org/apache/jmeter/report/core/CsvSampleReader.java   | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/report/core/CsvSampleReader.java 
b/src/core/src/main/java/org/apache/jmeter/report/core/CsvSampleReader.java
index 97508d58b5..86b134c805 100644
--- a/src/core/src/main/java/org/apache/jmeter/report/core/CsvSampleReader.java
+++ b/src/core/src/main/java/org/apache/jmeter/report/core/CsvSampleReader.java
@@ -150,18 +150,14 @@ public class CsvSampleReader implements Closeable{
 && CSVSaveService.getSampleSaveConfiguration(
 line, file.getAbsolutePath()) == null) {
 // Build metadata from default save config
-if (log.isWarnEnabled()) {
-log.warn(
-"File '{}' does not contain the field names 
header, "
-+ "ensure the jmeter.save.saveservice.* 
properties are the same "
-+ "as when the CSV file was created or the 
file may be read incorrectly "
-+ "when generating report",
-file.getAbsolutePath());
-}
-System.out.println("File '"+file.getAbsolutePath()+"' does not 
contain the field names header, "
+String warnMessage = "File '" + file.getAbsolutePath() + "' 
does not contain the field names header, "
 + "ensure the jmeter.save.saveservice.* properties are 
the same "
 + "as when the CSV file was created or the file may be 
read incorrectly "
-+ "when generating report");
++ "when generating report";
+if (log.isWarnEnabled()) {
+log.warn(warnMessage);
+}
+System.out.println(warnMessage);
 result = new SampleMetadata(
 SampleSaveConfiguration.staticConfig());
 



[jmeter] branch master updated (07b67a0ec9 -> 8d53bb9491)

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 07b67a0ec9 Check if target is reachable, before generating args for 
test
 new b22b00c694 Guess the delimiter of the CSV source, when configured one 
seems wrong.
 new 8d53bb9491 Don't generate same string twice.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/jmeter/report/core/CsvSampleReader.java | 16 -
 .../jmeter/report/core/SampleMetaDataParser.java   | 38 --
 xdocs/changes.xml  |  2 ++
 3 files changed, 43 insertions(+), 13 deletions(-)



[jmeter] 01/02: Guess the delimiter of the CSV source, when configured one seems wrong.

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit b22b00c69459dad4f7b02518c6a5e1f4bcfebad4
Author: Felix Schumacher 
AuthorDate: Sat Jul 9 14:14:09 2022 +0200

Guess the delimiter of the CSV source, when configured one seems wrong.

This is in line with the behaviour of CSVSaveService.

Bugzilla Id: 66140
---
 .../jmeter/report/core/SampleMetaDataParser.java   | 38 --
 xdocs/changes.xml  |  2 ++
 2 files changed, 37 insertions(+), 3 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
index aeab11b89c..bc96a660d5 100644
--- 
a/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
+++ 
b/src/core/src/main/java/org/apache/jmeter/report/core/SampleMetaDataParser.java
@@ -17,6 +17,10 @@
 
 package org.apache.jmeter.report.core;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 /**
@@ -26,14 +30,42 @@ import java.util.regex.Pattern;
  */
 public class SampleMetaDataParser {
 
-private char separator;
+private final char separator;
+
+private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
+private static final Pattern DELIMITER_PATTERN = Pattern
+// This assumes the header names are all single words with no 
spaces
+// word followed by 0 or more repeats of (non-word char + word)
+// where the non-word char (\2) is the same
+// e.g. abc|def|ghi but not abd|def~ghi
+.compile("\\w+((\\W)\\w+)?(\\2\\w+)*(\\2\"\\w+\")*" // $NON-NLS-1$
+// last entries may be quoted strings
+);
 
 public SampleMetaDataParser(char separator) {
 this.separator = separator;
 }
 
 public SampleMetadata parse(String headRow) {
-String[] cols = 
headRow.split(Pattern.quote(Character.toString(separator)));
-return new SampleMetadata(separator, cols);
+char useSep = separator;
+if (headRow.indexOf(useSep) < 0) {
+Matcher matcher = DELIMITER_PATTERN.matcher(headRow);
+if (matcher.matches()) {
+String guessedSep = matcher.group(2);
+if (guessedSep.length() != 1) {
+throw new IllegalArgumentException(
+"We guessed a delimiter of '"+guessedSep+"', but 
we support only one-character-separators");
+}
+useSep = guessedSep.charAt(0);
+logger.warn("Use guessed delimiter '{}' instead of configured 
'{}'. "
++"Please configure the property 
'jmeter.save.saveservice.default_delimiter={}'",
+useSep,
+separator,
+useSep);
+}
+}
+String[] cols = 
headRow.split(Pattern.quote(Character.toString(useSep)));
+return new SampleMetadata(useSep, cols);
 }
 }
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 65147fb68d..89aa8ddc62 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -137,6 +137,8 @@ Summary
 
 Report / Dashboard
 
+  66140Guess the delimiter of the CSV source, when configured 
one seems wrong.
+This is in line with the behaviour of CSVSaveService.
 
 
 Documentation



[jmeter] branch master updated: Check if target is reachable, before generating args for test

2022-07-09 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 07b67a0ec9 Check if target is reachable, before generating args for 
test
07b67a0ec9 is described below

commit 07b67a0ec917c73a3ddf6ab29167bb55e3583282
Author: Felix Schumacher 
AuthorDate: Sat Jul 9 13:17:40 2022 +0200

Check if target is reachable, before generating args for test

Travis doesn't add [::1] to it's local IPv6 interface on newer Ubuntu 
distros.
---
 .../protocol/http/sampler/ParallelResourcesAndIpSource.java   | 8 
 1 file changed, 8 insertions(+)

diff --git 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/ParallelResourcesAndIpSource.java
 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/ParallelResourcesAndIpSource.java
index 5034943860..9b50751b0b 100644
--- 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/ParallelResourcesAndIpSource.java
+++ 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/ParallelResourcesAndIpSource.java
@@ -19,6 +19,7 @@ package org.apache.jmeter.protocol.http.sampler;
 
 import static org.junit.jupiter.params.provider.Arguments.arguments;
 
+import java.io.IOException;
 import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
@@ -114,6 +115,13 @@ public class ParallelResourcesAndIpSource {
 // with the given source IP
 continue;
 }
+try {
+if (!InetAddress.getByName(targetHost).isReachable(100)) {
+continue;
+}
+} catch (IOException e) {
+continue;
+}
 
 localIps.forEach(localIp -> {
 if (finalLocal4 != null) {



[jmeter] branch master updated: install-jdk.sh on travis doesn't support Java 8 with Focal

2022-07-08 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new d07220973b install-jdk.sh on travis doesn't support Java 8 with Focal
d07220973b is described below

commit d07220973bb4be05c511f6f6874894b9accc384b
Author: Felix Schumacher 
AuthorDate: Fri Jul 8 15:04:22 2022 +0200

install-jdk.sh on travis doesn't support Java 8 with Focal
---
 .travis.yml | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 756b8c9430..262e2cb501 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,11 +29,16 @@ matrix:
 - name: Tests with OpenJDK 11 on s390x
   include:
 - name: Tests with OpenJDK 8 + code coverage
-  jdk: openjdk8
+  before_script:
+- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
   script:
 - xvfb-run ./gradlew build jacocoReport $SKIP_TAR
   after_success:
 - bash <(curl -s https://codecov.io/bash)
+  addons:
+apt:
+  packages:
+- openjdk-8-jdk
 - name: Tests with OpenJDK 11
   jdk: openjdk11
   addons:
@@ -91,7 +96,12 @@ matrix:
 # Spotless, Checkstyle, and JaCoCo are verified here to ensure they 
all work with the latest supported Java
 - xvfb-run ./gradlew build jacocoReport -Duser.language=fr 
-Duser.country=FR $SKIP_TAR
 - name: jmeter-maven-plugin tests
-  jdk: openjdk8
+  addons:
+apt:
+  packages:
+- openjdk-8-jdk
+  before_script:
+- export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
   script:
 - ./gradlew -PskipJavadoc publishToMavenLocal -Pjmeter.version=42.0 
-PchecksumIgnore
 - cd ..



[jmeter] branch master updated: Switch to Ubuntu focal for building on travis

2022-07-08 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c6f0685b5f Switch to Ubuntu focal for building on travis
c6f0685b5f is described below

commit c6f0685b5f3f61c52c71c970d6d4c9b4764bc5a0
Author: Felix Schumacher 
AuthorDate: Fri Jul 8 11:59:58 2022 +0200

Switch to Ubuntu focal for building on travis

The default dist is xenial, which is 16.04 and really out of date now
---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index dfa89c649d..756b8c9430 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,5 @@
 language: java
+dist: focal
 
 # skip default "install" command
 install: true



[jmeter] branch master updated (b914b71364 -> 0327a256c5)

2022-07-07 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from b914b71364 Correct theme for darklaf on rsyntaxtextarea
 new cc98da3914 Correct markup
 new 0327a256c5 Only bug fixes for now, so set next version to 5.5.1

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 gradle.properties | 2 +-
 xdocs/changes.xml | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)



[jmeter] 01/02: Correct markup

2022-07-07 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit cc98da39143caa456126a4787c199623f95f2ec3
Author: Felix Schumacher 
AuthorDate: Thu Jul 7 17:26:33 2022 +0200

Correct markup
---
 xdocs/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 84bb8e3ce4..a1d8771a71 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -145,7 +145,7 @@ Summary
 
 General
 
-  66157719Correct theme for darklaf on 
rsyntaxtextarea
+  66157719Correct theme for darklaf on 
rsyntaxtextarea
 
 
  



[jmeter] 02/02: Only bug fixes for now, so set next version to 5.5.1

2022-07-07 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 0327a256c591f8bea36eddbfe692ef65af0883e1
Author: Felix Schumacher 
AuthorDate: Thu Jul 7 17:27:50 2022 +0200

Only bug fixes for now, so set next version to 5.5.1
---
 gradle.properties | 2 +-
 xdocs/changes.xml | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 94d3f4c0e8..874c65a520 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -29,7 +29,7 @@ kotlin.code.style=official
 # This is version for Apache JMeter itself
 # Note: it should not include "-SNAPSHOT" as it is automatically added by 
build.gradle.kts
 # Release version can be generated by using -Prelease or -Prc= arguments
-jmeter.version=5.6
+jmeter.version=5.5.1
 
 # Tools
 checkstyle.version=9.3
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index a1d8771a71..65147fb68d 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -46,9 +46,9 @@ Earlier changes are detailed in the History of Pr
 
 
 
-
+
 
-Version 5.6
+Version 5.5.1
 
 Summary
 



[jmeter] branch master updated: Correct theme for darklaf on rsyntaxtextarea

2022-07-07 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new b914b71364 Correct theme for darklaf on rsyntaxtextarea
b914b71364 is described below

commit b914b713640ffd88b935786d13c0acce51b04259
Author: Felix Schumacher 
AuthorDate: Tue Jul 5 16:16:38 2022 +0200

Correct theme for darklaf on rsyntaxtextarea

The id of the theme has been changed to all lowercase

Bugzilla Id: 66517
Closes #719
---
 .../src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java  | 2 +-
 xdocs/changes.xml   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java 
b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
index 864a3e552e..260c59f4f8 100644
--- 
a/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
+++ 
b/src/core/src/main/java/org/apache/jmeter/gui/action/LookAndFeelCommand.java
@@ -200,7 +200,7 @@ public class LookAndFeelCommand extends AbstractAction {
 }
 
 public static boolean isDarklafTheme() {
-return "Darklaf".equals(UIManager.getLookAndFeel().getID()); // 
$NON-NLS-1$
+return "Darklaf".equalsIgnoreCase(UIManager.getLookAndFeel().getID()); 
// $NON-NLS-1$
 }
 
 public static boolean isDark() {
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 1130e30954..84bb8e3ce4 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -145,6 +145,7 @@ Summary
 
 General
 
+  66157719Correct theme for darklaf on 
rsyntaxtextarea
 
 
  



[jmeter] branch master updated: Prepare files for next round of 5.6-snapshots

2022-07-07 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 5143a97946 Prepare files for next round of 5.6-snapshots
5143a97946 is described below

commit 5143a9794699ae8abc0a636aab651db3fc2e8892
Author: Felix Schumacher 
AuthorDate: Thu Jul 7 16:41:08 2022 +0200

Prepare files for next round of 5.6-snapshots
---
 gradle.properties |   2 +-
 xdocs/changes.xml | 196 ++-
 xdocs/changes_history.xml | 393 +-
 3 files changed, 403 insertions(+), 188 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 7c1c765514..94d3f4c0e8 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -29,7 +29,7 @@ kotlin.code.style=official
 # This is version for Apache JMeter itself
 # Note: it should not include "-SNAPSHOT" as it is automatically added by 
build.gradle.kts
 # Release version can be generated by using -Prelease or -Prc= arguments
-jmeter.version=5.5
+jmeter.version=5.6
 
 # Tools
 checkstyle.version=9.3
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 3f461c0020..1130e30954 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -18,11 +18,15 @@
 
 
-
-
-
-
+
+
+
+
+
+
+
+
+
 ]>
 
 
@@ -42,9 +46,9 @@ Earlier changes are detailed in the History of Pr
 
 
 
-
+
 
-Version 5.5
+Version 5.6
 
 Summary
 
@@ -60,164 +64,43 @@ Summary
 
 
 New and Noteworthy
-JMeter now supports Java 17
-
-JMeter 5.5 ships with log4j2 2.17.2
-
-Open Model Thread Group
-
-New component: Open Model 
Thread Group
-allows creating load profiles with variable load.
-
-For example, if you need to gradually increase load from 0/sec 
to 10/sec during minute
-you could previously use Thread Group + Timer combinations. 
However, then you need to compute
-the expected number of threads, ensure they are created only when needed, and 
so on.
-
-With Open Model Thread Group you can configure the same load 
profile as rate(0/sec) random_arrivals(1minute) rate(10/sec).
-The thread group would spawn threads as needed to drive the configured load.
-The load profile can use properties, so you can launch the same script with 
slightly different load levels,
-however, the profile can't be updated while the test is running.
-
-
-The new thread group is experimental in JMeter 5.5, so please feel free to 
submit your feedback.
-Open 
Model Thread Group sample
-
-Preparing the deprecation of Oro Regex usage
-
-Another experimental feature in JMeter 5.5 is the ability to replace the 
Oro based Regex implementation
-  by the built-in Java based one. To choose the Java based one, set the JMeter 
property jmeter.regex.engine
-  to the value java.
-
-Core 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.
-
-
-https://github.com/JetBrains/lets-plot-kotlin;>lets-plot-kotlin 
charting library is added,
-so it will be easier to refine and create new charts in UI in the future.
-
 
 Improvements
 
 Thread Groups
 
-  New component: Open Model 
Thread Group
 
 
 HTTP Samplers and Test Script Recorder
 
-  65027Detect mime-type for files automatically when adding 
files to HTTP Sampler
-  65020HTTP Sampler/Files upload tab  add missing 
buttons
-  650HTTP Sampler timestamp fix when exception is caught. 
Contributed by Konstantin Kalinin (konstantin at kkalinin.pro)
-  65328666HTTP 308 Permanent Redirect is not 
supported. Contributed by
-Baptiste Gaillard (baptiste.gaillard at gmail.com)
 
 
 Other samplers
 
-  65149644Encode the personal part of email addresses 
in SMTP Sampler
-  638Various additions to the Bolt Sampler. Added 
transaction timeout, database
-option required for Neo4j 4.x (with multi-database support) and 
access mode option, that allows running
-against a Neo4j Enterprise Causal Cluster. Contributed by David Pecollet 
(david.pecollet at gmail.com)
 
 
 Controllers
 
-  665Increase visible lines of code in IfController 
and WhileController.
-Based on an idea by David Getzlaff (david.getzlaff at t-systems.com>).
 
 
 Listeners
 
-  64988Sort properties and variables in a human expected order 
for DebugPostProcessor and DebugSampler
-  63061Sort View Results in Table in a human expected order
-  706Try to keep UI responsive when displaying large text 
results. Can be configured with the new property
-  view.results.tree.simple_view_limit
 
 
 Timers, Assertions, Config, Pre-  Post-Processors
 
-638Bolt Connection Configuration: added 
ConnectionPoolMaxSize parameter. Contributed by
-David Pecollet (david.pecollet at gmail.com)
-65515Allow pooling of Prepared Statements in JDBC
-65299JSONPathAssertion attributes are out of order/Co

[jmeter] branch master updated: Update various dependecies

2022-06-06 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 7153c74dd0 Update various dependecies
7153c74dd0 is described below

commit 7153c74dd0e860d0ca3825cc5a23e976e0242b6e
Author: Felix Schumacher 
AuthorDate: Mon Jun 6 12:09:12 2022 +0200

Update various dependecies

* apiguardian-api.version=1.1.2
* asm.version=9.3
* jackson.version=2.13.3
* jsoup.version=1.15.1
* neo4j-java-driver.version=4.4.6
* tika.version=1.28.3
---
 gradle.properties   | 12 ++--
 src/dist/src/dist/expected_release_jars.csv | 18 +-
 xdocs/changes.xml   | 10 +-
 3 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index b4ef748aaf..7c1c765514 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -59,8 +59,8 @@ org.sonarqube.version=3.0
 accessors-smart.version=2.4.8
 activemq.version=5.16.4
 apache-rat.version=0.13
-apiguardian-api.version=1.1.0
-asm.version=9.2
+apiguardian-api.version=1.1.2
+asm.version=9.3
 bouncycastle.version=1.70
 bsf.version=2.4.0
 bsh.version=2.0b6
@@ -98,7 +98,7 @@ httpclient.version=4.5.13
 httpcore-nio.version=4.4.15
 httpcore.version=4.4.15
 httpmime.version=4.5.13
-jackson.version=2.13.2
+jackson.version=2.13.3
 jackson-databind.version=2.13.2.2
 javax.activation.version=1.2.0
 jcharts.version=0.7.5
@@ -109,7 +109,7 @@ jmespath-jackson.version=0.5.1
 jodd.version=5.0.13
 json-path.version=2.7.0
 json-smart.version=2.4.8
-jsoup.version=1.14.3
+jsoup.version=1.15.1
 jtidy.version=r938
 junit4.version=4.13.2
 junit5.version=5.8.2
@@ -121,7 +121,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.4.5
+neo4j-java-driver.version=4.4.6
 objenesis.version=3.2
 oro.version=2.0.8
 ph-commons.version=10.1.6
@@ -133,7 +133,7 @@ slf4j.version=1.7.36
 spock-core.version=2.1-groovy-3.0
 springframework.version=4.3.17.RELEASE
 svgSalamander.version=1.1.2.4
-tika.version=1.28.1
+tika.version=1.28.3
 xalan.version=2.7.2
 xercesImpl.version=2.12.2
 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 6b0e8ce033..c032b63b41 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -1,7 +1,7 @@
 29524,accessors-smart-2.4.8.jar
 29371,annotations-23.0.0.jar
-2387,apiguardian-api-1.1.0.jar
-122004,asm-9.2.jar
+6806,apiguardian-api-1.1.2.jar
+122176,asm-9.3.jar
 518460,base-portable-jvm-2.2.1.jar
 485809,batik-anim-1.14.jar
 424624,batik-awt-util-1.14.jar
@@ -69,9 +69,9 @@
 328324,httpcore-4.4.15.jar
 369486,httpcore-nio-4.4.15.jar
 41790,httpmime-4.5.13.jar
-75717,jackson-annotations-2.13.2.jar
-374739,jackson-core-2.13.2.jar
-1535087,jackson-databind-2.13.2.2.jar
+75714,jackson-annotations-2.13.3.jar
+374895,jackson-core-2.13.3.jar
+1536542,jackson-databind-2.13.3.jar
 78030,javax.activation-1.2.0.jar
 142391,jcharts-0.7.5.jar
 16555,jcl-over-slf4j-1.7.36.jar
@@ -83,7 +83,7 @@
 26047,jodd-props-5.0.13.jar
 271159,json-path-2.7.0.jar
 119545,json-smart-2.4.8.jar
-423395,jsoup-1.14.3.jar
+429123,jsoup-1.15.1.jar
 249924,jtidy-r938.jar
 384581,junit-4.13.2.jar
 32033,kotlin-logging-jvm-2.0.5.jar
@@ -105,7 +105,7 @@
 22576,miglayout-swing-5.3.jar
 419054,mongo-java-driver-2.11.3.jar
 29680,mxparser-1.2.2.jar
-4878084,neo4j-java-driver-4.4.5.jar
+4888362,neo4j-java-driver-4.4.6.jar
 65261,oro-2.0.8.jar
 1308773,ph-commons-10.1.6.jar
 530791,ph-css-6.5.0.jar
@@ -123,8 +123,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
-735645,tika-core-1.28.1.jar
-1585382,tika-parsers-1.28.1.jar
+735701,tika-core-1.28.3.jar
+1587751,tika-parsers-1.28.3.jar
 174661,vis-svg-portable-jvm-2.2.1.jar
 3154938,xalan-2.7.2.jar
 1446149,xercesImpl-2.12.2.jar
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 65abb34291..3f461c0020 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -165,7 +165,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.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)
+  656668Updated json-smart to 2.4.8 (from 2.3), 
accessors-smart to 2.4.8 (from 1.2) and asm 9.3 (from 9.0). Contributed

[jmeter] branch master updated: Update expected checksums for Groovy 3.0.11

2022-06-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6731c66412 Update expected checksums for Groovy 3.0.11
6731c66412 is described below

commit 6731c66412d638c24bef5f5061ec6e8ef30a3633
Author: Felix Schumacher 
AuthorDate: Sat Jun 4 12:01:55 2022 +0200

Update expected checksums for Groovy 3.0.11
---
 src/dist/src/dist/expected_release_jars.csv | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index e63f2ab31d..6b0e8ce033 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -52,15 +52,15 @@
 15992,error_prone_annotations-2.10.0.jar
 1715750,freemarker-2.3.31.jar
 32359,geronimo-jms_1.1_spec-1.1.1.jar
-8014657,groovy-3.0.10.jar
-19460,groovy-datetime-3.0.10.jar
-11688,groovy-dateutil-3.0.10.jar
-137554,groovy-jmx-3.0.10.jar
-133032,groovy-json-3.0.10.jar
-21298,groovy-jsr223-3.0.10.jar
-83198,groovy-sql-3.0.10.jar
-97128,groovy-templates-3.0.10.jar
-296091,groovy-xml-3.0.10.jar
+8023771,groovy-3.0.11.jar
+19460,groovy-datetime-3.0.11.jar
+11688,groovy-dateutil-3.0.11.jar
+137554,groovy-jmx-3.0.11.jar
+133032,groovy-json-3.0.11.jar
+21298,groovy-jsr223-3.0.11.jar
+83198,groovy-sql-3.0.11.jar
+98476,groovy-templates-3.0.11.jar
+296089,groovy-xml-3.0.11.jar
 123360,hamcrest-2.2.jar
 1499,hamcrest-core-2.2.jar
 109741,hamcrest-date-2.0.8.jar



[jmeter] branch master updated: Update to Groovy 3.0.11

2022-06-04 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 935b682103 Update to Groovy 3.0.11
935b682103 is described below

commit 935b6821036754e5abdf720d8e14e17b6150e681
Author: Felix Schumacher 
AuthorDate: Sat Jun 4 11:39:03 2022 +0200

Update to Groovy 3.0.11
---
 gradle.properties | 2 +-
 xdocs/changes.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle.properties b/gradle.properties
index 2549e977f0..b4ef748aaf 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -89,7 +89,7 @@ freemarker.version=2.3.31
 ftplet-api.version=1.2.0
 ftpserver-core.version=1.2.0
 geronimo-jms_1.1_spec.version=1.1.1
-groovy.version=3.0.10
+groovy.version=3.0.11
 hamcrest.version=2.2
 hamcrest-date.version=2.0.8
 hsqldb.version=2.5.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 7da2d1349d..65abb34291 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -168,7 +168,7 @@ however, the profile can't be updated while the test is 
running.
   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.10 (from 3.0.7).
+  Updated Groovy to 3.0.11 (from 3.0.7).
   Updated Darklaf to 2.7.3 (from 2.5.4).
   Updated Apache ActiveMQ to 15.6.4 (from 15.6.0).
   Updated Asm to 9.2 (from 9.1).



[jmeter] branch master updated: Split start up phase, to give splash screen more time

2022-04-29 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new aaead67610 Split start up phase, to give splash screen more time
aaead67610 is described below

commit aaead67610cd61d486d6ae54dab7b05338bcf40a
Author: Felix Schumacher 
AuthorDate: Fri Apr 29 19:31:10 2022 +0200

Split start up phase, to give splash screen more time

The move of method startGui into the Swing thread led
to an empty or not visible splash screen.

Bugzilla Id: 66044
---
 .../src/main/java/org/apache/jmeter/JMeter.java| 36 +-
 .../main/java/org/apache/jmeter/SplashScreen.java  |  6 +++-
 2 files changed, 33 insertions(+), 9 deletions(-)

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 7c6f51a098..039662e982 100644
--- a/src/core/src/main/java/org/apache/jmeter/JMeter.java
+++ b/src/core/src/main/java/org/apache/jmeter/JMeter.java
@@ -24,6 +24,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
+import java.lang.reflect.InvocationTargetException;
 import java.net.Authenticator;
 import java.net.DatagramPacket;
 import java.net.DatagramSocket;
@@ -377,7 +378,30 @@ public class JMeter implements JMeterPlugin {
 System.out.println("   Modify current env variable HEAP=\"-Xms1g 
-Xmx1g -XX:MaxMetaspaceSize=256m\" in the jmeter batch file");//NOSONAR
 System.out.println("Check : 
https://jmeter.apache.org/usermanual/best-practices.html;);//NOSONAR
 
System.out.println("");//NOSONAR
+invokeAndWait("LaF", JMeter::setupLaF);
 
+// SplashScreen is created after LaF activation, otherwise it would 
cause splash flicker.
+// bug 66044 split showing splash screen from the other parts to have 
content in the window
+SplashScreen splash = new SplashScreen();
+splash.showScreen();
+splash.setProgress(10);
+invokeAndWait("HiDPI settings", JMeterUtils::applyHiDPIOnFonts);
+splash.setProgress(20);
+invokeAndWait("main part", () -> startGuiPartTwo(testFile, splash));
+}
+
+private static void invokeAndWait(String part, Runnable doRun) {
+try {
+log.debug("Setting up {}", part);
+SwingUtilities.invokeAndWait(doRun);
+} catch (InterruptedException e) {
+log.warn("Interrupted while setting up {}", part, e);
+} catch (InvocationTargetException e) {
+log.warn("Problem while setting up {}", part, e);
+}
+}
+
+private static void setupLaF() {
 KerningOptimizer.INSTANCE.setMaxTextLengthWithKerning(
 JMeterUtils.getPropDefault("text.kerning.max_document_size", 
1)
 );
@@ -390,13 +414,9 @@ public class JMeter implements JMeterPlugin {
 } catch (IllegalArgumentException ex) {
 log.warn("Could not set LAF to: {}", jMeterLaf, ex);
 }
-// SplashWindow is created after LaF activation. Otherwise it would 
cause splash flicker
-SplashScreen splash = new SplashScreen();
-splash.showScreen();
-splash.setProgress(10);
-log.debug("Apply HiDPI on fonts");
-JMeterUtils.applyHiDPIOnFonts();
-splash.setProgress(20);
+}
+
+private void startGuiPartTwo(String testFile, SplashScreen splash) {
 log.debug("Configure PluginManager");
 PluginManager.install(this, true);
 splash.setProgress(30);
@@ -565,7 +585,7 @@ public class JMeter implements JMeterPlugin {
 generator.generate();
 } else if (parser.getArgumentById(NONGUI_OPT) == null) { // 
not non-GUI => GUI
 String initialTestFile = testFile;
-SwingUtilities.invokeAndWait(() -> 
startGui(initialTestFile));
+startGui(initialTestFile);
 startOptionalServers();
 } else { // NON-GUI must be true
 extractAndSetReportOutputFolder(parser, deleteResultFile);
diff --git a/src/core/src/main/java/org/apache/jmeter/SplashScreen.java 
b/src/core/src/main/java/org/apache/jmeter/SplashScreen.java
index 809ca8f8d7..b3326bb221 100644
--- a/src/core/src/main/java/org/apache/jmeter/SplashScreen.java
+++ b/src/core/src/main/java/org/apache/jmeter/SplashScreen.java
@@ -109,6 +109,10 @@ public class SplashScreen extends JDialog {
  * @param progress Loading progress
  */
 public void setProgress(final int progress) {
-SwingUtilities.invo

[jmeter] branch master updated: Code clean-up mainly to trigger CI

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ce94f0db8a Code clean-up mainly to trigger CI
ce94f0db8a is described below

commit ce94f0db8ab17e27dec2ec5474dbb1c1c940b8a8
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 22:03:32 2022 +0200

Code clean-up mainly to trigger CI

Junit5 method conversion and a few minor nags from IDE.
---
 .../test/java/org/apache/jmeter/threads/TestJMeterThread.java  | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java 
b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
index 7ad315d949..a114203099 100644
--- a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
+++ b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
@@ -17,9 +17,6 @@
 
 package org.apache.jmeter.threads;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import java.time.Instant;
 
 import org.apache.jmeter.control.LoopController;
@@ -65,7 +62,7 @@ class TestJMeterThread {
 if (!super.equals(obj)) {
 return false;
 }
-if (getClass() != obj.getClass()) {
+if (!getClass().equals(obj.getClass())) {
 return false;
 }
 DummySampler other = (DummySampler) obj;
@@ -75,6 +72,7 @@ class TestJMeterThread {
 }
 
 private static class DummyTimer extends AbstractTestElement implements 
Timer {
+private static final long serialVersionUID = 5641410390783919241L;
 private long delay;
 
 void setDelay(long delay) {
@@ -160,11 +158,11 @@ class TestJMeterThread {
 jMeterThread.run();
 long duration = Instant.now().toEpochMilli() - 
startTime.toEpochMilli();
 
-assertFalse("Sampler should not be called", dummySampler.isCalled());
+Assertions.assertFalse(dummySampler.isCalled(), "Sampler should not be 
called");
 
 // the duration of this test plan should currently be around zero 
seconds,
 // but it is allowed to take up to maxDuration amount of time
-assertTrue("Test plan should not run for longer than duration", 
duration <= maxDuration);
+Assertions.assertTrue(duration <= maxDuration, "Test plan should not 
run for longer than duration");
 }
 
 private LoopController createLoopController() {



[jmeter] branch master updated: Convert to junit5 methods

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new a0eb461d74 Convert to junit5 methods
a0eb461d74 is described below

commit a0eb461d74ac70c8b1f2ad025c008c83110f8ff3
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 19:56:06 2022 +0200

Convert to junit5 methods
---
 .../test/java/org/apache/jmeter/JMeterTest.java| 28 ++
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/core/src/test/java/org/apache/jmeter/JMeterTest.java 
b/src/core/src/test/java/org/apache/jmeter/JMeterTest.java
index 77fec89f51..d4021dc1c9 100644
--- a/src/core/src/test/java/org/apache/jmeter/JMeterTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/JMeterTest.java
@@ -17,9 +17,6 @@
 
 package org.apache.jmeter;
 
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -31,24 +28,25 @@ import java.nio.charset.StandardCharsets;
 import org.apache.jmeter.junit.JMeterTestCase;
 import org.apache.jmeter.report.config.ConfigurationException;
 import org.apache.jorphan.test.JMeterSerialTest;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-public class JMeterTest extends JMeterTestCase implements JMeterSerialTest {
+class JMeterTest extends JMeterTestCase implements JMeterSerialTest {
 
 @Test
-public void testFailureWhenJmxDoesntExist() {
+void testFailureWhenJmxDoesNotExist() {
 JMeter jmeter = new JMeter();
 try {
 jmeter.runNonGui("testPlan.jmx", null, false, null, false);
-fail("Expected ConfigurationException to be thrown");
+Assertions.fail("Expected ConfigurationException to be thrown");
 } catch (ConfigurationException e) {
-assertTrue("When the file doesn't exist, this method 'runNonGui' 
should have a detailed message",
-e.getMessage().contains("doesn't exist or can't be 
opened"));
+Assertions.assertTrue(e.getMessage().contains("doesn't exist or 
can't be opened"),
+"When the file doesn't exist, this method 'runNonGui' 
should have a detailed message");
 }
 }
 
 @Test
-public void testSuccessWhenJmxExists() throws IOException, 
ConfigurationException {
+void testSuccessWhenJmxExists() throws IOException, ConfigurationException 
{
 File temp = File.createTempFile("testPlan", ".jmx");
 String testPlan = "\n"
 + "\n" + "  \n"
@@ -72,12 +70,12 @@ public class JMeterTest extends JMeterTestCase implements 
JMeterSerialTest {
 JMeter jmeter = new JMeter();
 jmeter.runNonGui(temp.getAbsolutePath(), null, false, null, false);
 } finally {
-assertTrue("File "+ temp.getAbsolutePath()+ " should have been 
deleted", temp.delete());
+Assertions.assertTrue(temp.delete(), () ->"File " + 
temp.getAbsolutePath() + " should have been deleted");
 }
 }
 
 @Test
-public void testFailureWithMissingPlugin() throws IOException, 
ConfigurationException {
+void testFailureWithMissingPlugin() throws IOException {
 File temp = File.createTempFile("testPlan", ".jmx");
 String testPlan = "\n"
 + "\n"
@@ -114,12 +112,12 @@ public class JMeterTest extends JMeterTestCase implements 
JMeterSerialTest {
 JMeter jmeter = new JMeter();
 try {
 jmeter.runNonGui(temp.getAbsolutePath(), null, false, null, false);
-fail("Expected ConfigurationException to be thrown");
+Assertions.fail("Expected ConfigurationException to be thrown");
 } catch (ConfigurationException e) {
-assertTrue("When the plugin doesn't exist, the method 'runNonGui' 
should have a detailed message",
-e.getMessage().contains("Error in NonGUIDriver Problem 
loading XML from"));
+Assertions.assertTrue(e.getMessage().contains("Error in 
NonGUIDriver Problem loading XML from"),
+"When the plugin doesn't exist, the method 'runNonGui' 
should have a detailed message");
 } finally {
-assertTrue("File "+ temp.getAbsolutePath()+ " should have been 
deleted", temp.delete());
+Assertions.assertTrue(temp.delete(), () -> "File " + 
temp.getAbsolutePath() + " should have been deleted");
 }
 }
 }



[jmeter] branch master updated: Remove unused import

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6ffd2ddfe0 Remove unused import
6ffd2ddfe0 is described below

commit 6ffd2ddfe0a34c76589ba297232aebedcf317e7d
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 19:44:33 2022 +0200

Remove unused import
---
 .../src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java  | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java 
b/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
index 0a5f37344d..92308c1001 100644
--- 
a/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
+++ 
b/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
@@ -20,7 +20,6 @@ package org.apache.jmeter.resources;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;



[jmeter] branch master updated: Use correct constructors for Charset aware Reader

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new eaf5d0edfe Use correct constructors for Charset aware Reader
eaf5d0edfe is described below

commit eaf5d0edfe1cbe0b8eb9608c0a1de538b1c7c67a
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 19:20:11 2022 +0200

Use correct constructors for Charset aware Reader

and clean-up the code a bit
---
 .../jmeter/resources/ResourceKeyUsageTest.java | 49 ++
 1 file changed, 21 insertions(+), 28 deletions(-)

diff --git 
a/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java 
b/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
index b9af52655f..0a5f37344d 100644
--- 
a/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
+++ 
b/src/core/src/test/java/org/apache/jmeter/resources/ResourceKeyUsageTest.java
@@ -17,15 +17,13 @@
 
 package org.apache.jmeter.resources;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileReader;
+import java.io.FileInputStream;
 import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
@@ -34,10 +32,10 @@ import java.util.PropertyResourceBundle;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.jorphan.util.JOrphanUtils;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
-public class ResourceKeyUsageTest {
+class ResourceKeyUsageTest {
 // We assume the test starts in "module" (e.g. src/core) directory (which 
is true for Gradle and IDEs)
 private static final File srcFiledir = new File("src/main/java");
 
@@ -52,23 +50,21 @@ public class ResourceKeyUsageTest {
 
 // Check that calls to getResString use a valid property key name
 @Test
-@SuppressWarnings("CatchAndPrintStackTrace")
-public void checkResourceReferences() throws Exception {
+void checkResourceReferences() throws Exception {
 String resourceName = 
"/org/apache/jmeter/resources/messages.properties";
 PropertyResourceBundle messagePRB = getRAS(resourceName);
-assertNotNull("Resource bundle " + resourceName + " was not found", 
resourceName);
+Assertions.assertNotNull(resourceName, () -> "Resource bundle " + 
resourceName + " was not found");
 List failures = new ArrayList<>();
+final List exceptions = new ArrayList<>();
 
-PackageTest.findFile(srcFiledir, null, new FilenameFilter() {
-@Override
-public boolean accept(File dir, String name) {
-final File file = new File(dir, name);
-// Look for calls to JMeterUtils.getResString()
-final Pattern pat = 
Pattern.compile(".*getResString\\(\"([^\"]+)\"\\).*");
-if (name.endsWith(".java")) {
-  BufferedReader fileReader = null;
-  try {
-fileReader = new BufferedReader(new FileReader(file, 
StandardCharsets.UTF_8));
+PackageTest.findFile(srcFiledir, null, (dir, name) -> {
+final File file = new File(dir, name);
+// Look for calls to JMeterUtils.getResString()
+final Pattern pat = 
Pattern.compile(".*getResString\\(\"([^\"]+)\"\\).*");
+if (name.endsWith(".java")) {
+try (FileInputStream fis = new FileInputStream(file);
+ InputStreamReader is = new InputStreamReader(fis, 
StandardCharsets.UTF_8);
+ BufferedReader fileReader = new BufferedReader(is)) {
 String s;
 while ((s = fileReader.readLine()) != null) {
 if (s.matches("\\s*//.*")) { // leading comment
@@ -81,28 +77,25 @@ public class ResourceKeyUsageTest {
 String resKey = key.replace(' ', '_'); // 
$NON-NLS-1$ // $NON-NLS-2$
 resKey = 
resKey.toLowerCase(java.util.Locale.ENGLISH);
 if (!key.equals(resKey)) {
-System.out.println(file+": non-standard 
message key: '"+key+"'");
+System.out.println(file + ": non-standard 
message key: '" + key + "'");
 }
 try {
 messagePRB.getString(resKey);
  

[jmeter] 10/16: Use newer time API to make error prone happy

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 9fb66c4ab00c8198b97f49962f262b46ce877438
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:11:15 2022 +0200

Use newer time API to make error prone happy
---
 .../apache/jmeter/threads/TestJMeterThread.java|  6 +--
 .../functions/TestTimeRandomDateFunction.java  | 46 +++---
 .../jmeter/functions/TestTimeShiftFunction.java| 20 +-
 .../http/control/TestCacheManagerBase.java | 44 +++--
 .../control/TestCacheManagerThreadIteration.java   | 29 +++---
 5 files changed, 75 insertions(+), 70 deletions(-)

diff --git 
a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java 
b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
index 9cbbc3be42..7ad315d949 100644
--- a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
+++ b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
@@ -20,7 +20,7 @@ package org.apache.jmeter.threads;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Date;
+import java.time.Instant;
 
 import org.apache.jmeter.control.LoopController;
 import org.apache.jmeter.samplers.AbstractSampler;
@@ -156,9 +156,9 @@ class TestJMeterThread {
 jMeterThread.setScheduled(true);
 jMeterThread.setEndTime(System.currentTimeMillis() + maxDuration);
 jMeterThread.setThreadGroup(threadGroup);
-long startTime = new Date().getTime();
+Instant startTime = Instant.now();
 jMeterThread.run();
-long duration = new Date().getTime() - startTime;
+long duration = Instant.now().toEpochMilli() - 
startTime.toEpochMilli();
 
 assertFalse("Sampler should not be called", dummySampler.isCalled());
 
diff --git 
a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
 
b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
index b53f7bdf01..b0e99fd660 100644
--- 
a/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
+++ 
b/src/functions/src/test/java/org/apache/jmeter/functions/TestTimeRandomDateFunction.java
@@ -21,10 +21,9 @@ import static 
org.apache.jmeter.functions.FunctionTestHelper.makeParams;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 import java.time.LocalDate;
+import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.util.Collection;
 
@@ -34,6 +33,7 @@ import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.threads.JMeterContext;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
@@ -46,7 +46,7 @@ public class TestTimeRandomDateFunction extends 
JMeterTestCase {
 private String value;
 
 @BeforeEach
-public void setUp() {
+void setUp() {
 jmctx = JMeterContextService.getContext();
 vars = new JMeterVariables();
 jmctx.setVariables(vars);
@@ -56,12 +56,12 @@ public class TestTimeRandomDateFunction extends 
JMeterTestCase {
 }
 
 @Test
-public void testParameterCount() throws Exception {
+void testParameterCount() throws Exception {
 checkInvalidParameterCounts(function, 3, 5);
 }
 
 @Test
-public void testDefault() throws Exception {
+void testDefault() throws Exception {
 String endDate = "2099-01-01";
 String formatDate = "-dd-MM";
 DateTimeFormatter formatter = DateTimeFormatter.ofPattern(formatDate);
@@ -69,22 +69,22 @@ public class TestTimeRandomDateFunction extends 
JMeterTestCase {
 function.setParameters(params);
 value = function.execute(result, null);
 LocalDate result = LocalDate.parse(value, formatter);
-LocalDate now = LocalDate.now();
+LocalDate now = LocalDate.now(ZoneId.systemDefault());
 LocalDate max = LocalDate.parse(endDate, formatter);
-assertTrue(now.isBefore(result) && result.isBefore(max));
+Assertions.assertTrue(now.isBefore(result) && result.isBefore(max));
 }
 
 @Test
-public void testDefault2() throws Exception {
+void testDefault2() throws Exception {
 String endDate = "2099-01-01";
 Collection params = makeParams("-dd-MM", "", 
endDate, "", "");
 function.setParameters(params);
 value = function.execu

[jmeter] 09/16: Use ArrayList instead of LinkedList

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit cf4ae3281651eabf5d01a55dcd4822793afc74a4
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:54:18 2022 +0200

Use ArrayList instead of LinkedList

it is considered to be faster in almost all cases.

While we are here
 * Suppress a warning about catching and printing an exception
 * Add override annotations to anonymous classes methods
 * convert to junit5 methods
 * shorten lines to less than 120 chars
 * introduce a private helper to make params (a real builder/DSL would
   be even better)
 * introduce a helper method to assert a range check
---
 .../jmeter/engine/DistributedRunnerTest.java   |   5 +-
 .../gui/logging/TestGuiLogEventAppender.java   |   7 +-
 .../jmeter/util/LogRecordingDelegatingLogger.java  |   4 +-
 .../java/org/apache/jmeter/junit/JMeterTest.java   |   4 +-
 .../apache/jmeter/functions/SplitFunctionTest.java |   4 +-
 .../apache/jmeter/functions/SumFunctionTest.java   |  20 +-
 .../apache/jmeter/functions/TestChangeCase.java|   4 +-
 .../functions/TestDateTimeConvertFunction.java |  36 +--
 .../jmeter/functions/TestDigestFunction.java   |  34 +--
 .../jmeter/functions/TestEscapeOroRegexpChars.java |  33 ++-
 .../apache/jmeter/functions/TestFileToString.java  |   4 +-
 .../jmeter/functions/TestGroovyFunction.java   |   4 +-
 .../apache/jmeter/functions/TestIsPropDefined.java |   4 +-
 .../apache/jmeter/functions/TestIsVarDefined.java  |  14 +-
 .../jmeter/functions/TestJavascriptFunction.java   |  32 +--
 .../apache/jmeter/functions/TestJexl2Function.java |  35 ++-
 .../apache/jmeter/functions/TestMachineIPName.java |  19 +-
 .../functions/TestRandomFromMultipleVars.java  |  24 +-
 .../apache/jmeter/functions/TestRegexFunction.java | 288 +++--
 .../jmeter/functions/TestSamplerNameFunction.java  |  19 +-
 .../apache/jmeter/functions/TestSetProperty.java   |   4 +-
 .../jmeter/functions/TestSimpleFunctions.java  |  25 +-
 .../apache/jmeter/functions/TestTimeFunction.java  |  80 +++---
 .../jmeter/functions/TestUrlEncodeDecode.java  |  19 +-
 .../protocol/http/util/TestHTTPFileArgs.java   |   4 +-
 25 files changed, 365 insertions(+), 361 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 172b94d169..bca3154142 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
@@ -23,8 +23,8 @@ import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Properties;
@@ -40,6 +40,7 @@ import org.slf4j.LoggerFactory;
 @Execution(ExecutionMode.SAME_THREAD) // System.setOut must not be run 
concurrently with other tests
 public class DistributedRunnerTest {
 
+@SuppressWarnings("CatchAndPrintStackTrace")
 public static void createJmeterEnv() {
 File propsFile;
 try {
@@ -127,7 +128,7 @@ public class DistributedRunnerTest {
 }
 
 private static class DistributedRunnerEmul extends DistributedRunner {
-public List engines = new LinkedList<>();
+public List engines = new ArrayList<>();
 
 @Override
 protected JMeterEngine createEngine(String address) {
diff --git 
a/src/core/src/test/java/org/apache/jmeter/gui/logging/TestGuiLogEventAppender.java
 
b/src/core/src/test/java/org/apache/jmeter/gui/logging/TestGuiLogEventAppender.java
index 0182366ed7..e59184d17c 100644
--- 
a/src/core/src/test/java/org/apache/jmeter/gui/logging/TestGuiLogEventAppender.java
+++ 
b/src/core/src/test/java/org/apache/jmeter/gui/logging/TestGuiLogEventAppender.java
@@ -19,8 +19,8 @@ package org.apache.jmeter.gui.logging;
 
 import static org.junit.Assert.assertTrue;
 
+import java.util.ArrayList;
 import java.util.Collections;
-import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.logging.log4j.Level;
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
 
 public class TestGuiLogEventAppender {
 
-private static List log4j2LevelErrorMessages = 
Collections.synchronizedList(new LinkedList<>());
+private static List log4j2LevelErrorMessages = 
Collections.synchronizedList(new ArrayList<>());
 
 /*
  * Configure logging with GuiLogEventAppender for root logger, and 
override the handler of GuiLogEventAppender
@@ -74,14 +74,17 @@ public class TestGuiLogEventAppender {
 
 guiLogEventAppender.stop();
 guiLogEventAppender.setHandler(new ErrorHandler() {
+   

[jmeter] 16/16: Updated a few dependencies

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 89f4a76c61004cf68598b92883e2d1456e6c8ba1
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:36:27 2022 +0200

Updated a few dependencies
---
 checksum.xml|  3 +++
 gradle.properties   | 26 +++---
 src/dist/src/dist/expected_release_jars.csv | 34 ++---
 xdocs/changes.xml   | 17 ---
 4 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/checksum.xml b/checksum.xml
index 3d43a4475c..d40d479ca2 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -16,6 +16,7 @@
 
 
 
+
 
 
 
@@ -143,6 +144,7 @@
 
 
 
+
 
 
 
@@ -189,6 +191,7 @@
 
 
 
+
 
 
 
diff --git a/gradle.properties b/gradle.properties
index 6caea8bcf3..56428b4043 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -61,7 +61,7 @@ activemq.version=5.16.4
 apache-rat.version=0.13
 apiguardian-api.version=1.1.0
 asm.version=9.2
-bouncycastle.version=1.69
+bouncycastle.version=1.70
 bsf.version=2.4.0
 bsh.version=2.0b6
 caffeine.version=2.9.3
@@ -84,12 +84,12 @@ darklaf.version=2.7.3
 darklaf.extensions.version=0.3.4
 dec.version=0.1.2
 dnsjava.version=2.1.9
-equalsverifier.version=3.9
+equalsverifier.version=3.10
 freemarker.version=2.3.31
-ftplet-api.version=1.1.3
-ftpserver-core.version=1.1.3
+ftplet-api.version=1.2.0
+ftpserver-core.version=1.2.0
 geronimo-jms_1.1_spec.version=1.1.1
-groovy.version=3.0.9
+groovy.version=3.0.10
 hamcrest.version=2.2
 hamcrest-date.version=2.0.8
 hsqldb.version=2.5.2
@@ -98,8 +98,8 @@ httpclient.version=4.5.13
 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
+jackson.version=2.13.2
+jackson-databind.version=2.13.2.2
 javax.activation.version=1.2.0
 jcharts.version=0.7.5
 jdom.version=1.1.3
@@ -107,7 +107,7 @@ jetbrains-annotations.version=23.0.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-path.version=2.7.0
 json-smart.version=2.4.8
 jsoup.version=1.14.3
 jtidy.version=r938
@@ -120,16 +120,16 @@ 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.4.3
+neo4j-java-driver.version=4.4.5
 objenesis.version=3.2
 oro.version=2.0.8
 ph-commons.version=10.1.6
 ph-css.version=6.5.0
-rhino.version=1.7.13
-rsyntaxtextarea.version=3.1.6
-Saxon-HE.version=11.2
+rhino.version=1.7.14
+rsyntaxtextarea.version=3.2.0
+Saxon-HE.version=11.3
 slf4j.version=1.7.36
-spock-core.version=2.0-M2-groovy-3.0
+spock-core.version=2.1-groovy-3.0
 springframework.version=4.3.17.RELEASE
 svgSalamander.version=1.1.2.4
 tika.version=1.28.1
diff --git a/src/dist/src/dist/expected_release_jars.csv 
b/src/dist/src/dist/expected_release_jars.csv
index d627e3d964..f518fb736e 100644
--- a/src/dist/src/dist/expected_release_jars.csv
+++ b/src/dist/src/dist/expected_release_jars.csv
@@ -52,15 +52,15 @@
 15992,error_prone_annotations-2.10.0.jar
 1715750,freemarker-2.3.31.jar
 32359,geronimo-jms_1.1_spec-1.1.1.jar
-8004986,groovy-3.0.9.jar
-19457,groovy-datetime-3.0.9.jar
-11684,groovy-dateutil-3.0.9.jar
-137553,groovy-jmx-3.0.9.jar
-133032,groovy-json-3.0.9.jar
-21294,groovy-jsr223-3.0.9.jar
-82930,groovy-sql-3.0.9.jar
-97097,groovy-templates-3.0.9.jar
-296025,groovy-xml-3.0.9.jar
+8014657,groovy-3.0.10.jar
+19460,groovy-datetime-3.0.10.jar
+11688,groovy-dateutil-3.0.10.jar
+137554,groovy-jmx-3.0.10.jar
+133032,groovy-json-3.0.10.jar
+21298,groovy-jsr223-3.0.10.jar
+83198,groovy-sql-3.0.10.jar
+97128,groovy-templates-3.0.10.jar
+296091,groovy-xml-3.0.10.jar
 123360,hamcrest-2.2.jar
 1499,hamcrest-core-2.2.jar
 109741,hamcrest-date-2.0.8.jar
@@ -69,9 +69,9 @@
 328324,httpcore-4.4.15.jar
 369486,httpcore-nio-4.4.15.jar
 41790,httpmime-4.5.13.jar
-75717,jackson-annotations-2.13.1.jar
-374588,jackson-core-2.13.1.jar
-1534017,jackson-databind-2.13.1.jar
+75717,jackson-annotations-2.13.2.jar
+374739,jackson-core-2.13.2.jar
+1535087,jackson-databind-2.13.2.2.jar
 78030,javax.activation-1.2.0.jar
 142391,jcharts-0.7.5.jar
 16555,jcl-over-slf4j-1.7.36.jar
@@ -81,7 +81,7 @@
 220475,jodd-lagarto-5.0.13.jar
 19858,jodd-log-5.0.13.jar
 26047,jodd-props-5.0.13.jar
-238605,json-path-2.6.0.jar
+271159,json-path-2.7.0.jar
 119545,json-smart-2.4.8.jar
 423395,jsoup-1.14.3.jar
 249924,jtidy-r938.jar
@@ -103,7 +103,7 @@
 22576,miglayout-swing-5.3.jar
 419054,mongo-java-driver-2.11.3.jar
 29680,mxparser-1.2.2.jar
-4890898,neo4j-java-driver-4.4.3.jar
+4878084,neo4j-java-driver-4.4.5.jar
 65261,oro-2.0.8.jar
 1308773,ph-commons-10.1.6.jar
 530791,ph-css-6.5.0.jar
@@ -113,9 +113,9 @@
 116030,plot-common-portable-jvm-2.2.1.jar
 749095,plot-config

[jmeter] 04/16: Make error prone happier by using static inner class

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit a91c28d82bbf8631c9051830bb5e78336da9266f
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:33:26 2022 +0200

Make error prone happier by using static inner class

While we are here, switch to junit5 methods.
---
 .../org/apache/jmeter/control/TestTransactionController.java | 12 +++-
 .../jmeter/samplers/TestDataStrippingSampleSender.java   |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/control/TestTransactionController.java
 
b/src/components/src/test/java/org/apache/jmeter/control/TestTransactionController.java
index f9bcb6f9fc..ac54f06479 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/control/TestTransactionController.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/control/TestTransactionController.java
@@ -17,8 +17,6 @@
 
 package org.apache.jmeter.control;
 
-import static org.junit.Assert.assertEquals;
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -35,6 +33,7 @@ import org.apache.jmeter.threads.ListenerNotifier;
 import org.apache.jmeter.threads.TestCompiler;
 import org.apache.jmeter.threads.ThreadGroup;
 import org.apache.jorphan.collections.ListedHashTree;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
 
@@ -81,11 +80,14 @@ public class TestTransactionController extends 
JMeterTestCase {
 thread.setOnErrorStopThread(true);
 thread.run();
 
-assertEquals("Must one transaction samples with parent debug sample", 
1, listener.events.size());
-assertEquals("Number of samples in transaction : 1, number of failing 
samples : 1", listener.events.get(0).getResult().getResponseMessage());
+Assertions.assertEquals(1, listener.events.size(),
+"Must one transaction samples with parent debug sample");
+Assertions.assertEquals("Number of samples in transaction : 1, number 
of failing samples : 1",
+listener.events.get(0).getResult().getResponseMessage());
 }
 
-public class TestSampleListener extends ResultCollector implements 
SampleListener {
+public static class TestSampleListener extends ResultCollector implements 
SampleListener {
+private static final long serialVersionUID = -1373192220822942714L;
 public List events = new ArrayList<>();
 
 @Override
diff --git 
a/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
 
b/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
index cac17a5d78..a2168564ef 100644
--- 
a/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
+++ 
b/src/core/src/test/java/org/apache/jmeter/samplers/TestDataStrippingSampleSender.java
@@ -92,7 +92,7 @@ class TestDataStrippingSampleSender extends JMeterTestCase 
implements JMeterSeri
 return result;
 }
 
-private class SimpleSender implements SampleSender {
+private static class SimpleSender implements SampleSender {
 
 private SampleResult result;
 



[jmeter] 05/16: Silence warning about mutable enums

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit b351b6df75b49605013f2fdabb8f52faf727f71f
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:36:36 2022 +0200

Silence warning about mutable enums

We are probably not using the enum as a pattern correctly, but it works
for us now. Might be worth to look further into this.
---
 .../test/java/org/apache/jmeter/extractor/TestJSONPostProcessor.java   | 3 ++-
 .../apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/extractor/TestJSONPostProcessor.java
 
b/src/components/src/test/java/org/apache/jmeter/extractor/TestJSONPostProcessor.java
index 891a849d5c..7705bee083 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/extractor/TestJSONPostProcessor.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/extractor/TestJSONPostProcessor.java
@@ -43,12 +43,13 @@ class TestJSONPostProcessor {
 
 private static final String VAR_NAME = "varName";
 
+@SuppressWarnings("ImmutableEnumChecker")
 private enum AccessMode {
 ALL(AbstractScopedTestElement::setScopeAll),
 PARENT(AbstractScopedTestElement::setScopeParent),
 CHILDREN(AbstractScopedTestElement::setScopeChildren);
 
-private Consumer applier;
+private final Consumer applier;
 
 AccessMode(Consumer applier) {
 this.applier = applier;
diff --git 
a/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
 
b/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
index 008f18df19..b10f6e1a5a 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/extractor/json/jmespath/TestJMESPathExtractor.java
@@ -193,7 +193,8 @@ class TestJMESPathExtractor {
 PARENT(AbstractScopedTestElement::setScopeParent),
 CHILDREN(AbstractScopedTestElement::setScopeChildren);
 
-private Consumer applier;
+@SuppressWarnings("ImmutableEnumChecker")
+private final Consumer applier;
 
 AccessMode(Consumer applier) {
 this.applier = applier;



[jmeter] 12/16: Suppress warning about calling wait without a loop

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 16340ba1b8a0d441cb52c58423ebc0d3bf343fb9
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:21:19 2022 +0200

Suppress warning about calling wait without a loop

While it is certainly not good to wait ouside a loop,
it is not that problematic here, as the test should fail
in such a case.
---
 .../src/test/java/org/apache/jmeter/functions/Synchronizer.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/src/functions/src/test/java/org/apache/jmeter/functions/Synchronizer.java 
b/src/functions/src/test/java/org/apache/jmeter/functions/Synchronizer.java
index ebcd95648d..93a061444d 100644
--- a/src/functions/src/test/java/org/apache/jmeter/functions/Synchronizer.java
+++ b/src/functions/src/test/java/org/apache/jmeter/functions/Synchronizer.java
@@ -25,6 +25,7 @@ class Synchronizer {
 notifyAll();
 }
 
+@SuppressWarnings("WaitNotInLoop")
 void pass() {
 done();
 try {



[jmeter] 02/16: Get rid of error prone warnings because of missing explicit default character encoding

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 1e93c67a59673fe4d71a3a710c80bb485965b355
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 15:46:26 2022 +0200

Get rid of error prone warnings because of missing explicit default 
character encoding

While we are in the sources, use try-with, isEmpty and other minor 
clean-ups.
Don't encode ASCII printable characters as unicode sequences, as they are
decoded by Java anyway and are obfuscating the code unnecessarily.
Remove unused method variables and parameters, when possible.
Use ArrayList instead of LinkedList, when possible (more will follow).
---
 .../jmeter/assertions/TestJSONPathAssertion.java   | 40 --
 .../jmeter/assertions/XMLSchemaAssertionTest.java  | 31 ++---
 .../test/java/org/apache/jmeter/JMeterTest.java| 11 --
 .../apache/jmeter/junit/JMeterTestCaseJUnit.java   |  4 +--
 .../jmeter/resources/ResourceKeyUsageTest.java |  6 ++--
 .../org/apache/jmeter/save/TestSaveService.java| 10 +++---
 .../protocol/http/control/TestAuthManager.java | 12 +--
 .../protocol/http/proxy/TestHttpRequestHdr.java| 23 ++---
 .../protocol/http/sampler/PostWriterTest.java  | 22 +++-
 .../TestHTTPSamplersAgainstHttpMirrorServer.java   |  7 ++--
 10 files changed, 97 insertions(+), 69 deletions(-)

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 125662f790..e9349efb1e 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.assertEquals;
 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;
@@ -86,7 +87,7 @@ class TestJSONPathAssertion {
 }, delimiterString=";")
 void testGetResult_pathsWithOneResult(String data, String jsonPath, String 
expectedResult) {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData(data.getBytes());
+samplerResult.setResponseData(data.getBytes(Charset.defaultCharset()));
 
 JSONPathAssertion instance = new JSONPathAssertion();
 instance.setJsonPath(jsonPath);
@@ -101,7 +102,7 @@ class TestJSONPathAssertion {
 @Test
 void testGetResult_positive_regexp() {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 123}".getBytes());
+samplerResult.setResponseData("{\"myval\": 
123}".getBytes(Charset.defaultCharset()));
 
 JSONPathAssertion instance = new JSONPathAssertion();
 instance.setJsonPath("$.myval");
@@ -112,7 +113,7 @@ class TestJSONPathAssertion {
 assertEquals(expResult.getName(), result.getName());
 assertFalse(result.isFailure());
 
-samplerResult.setResponseData("{\"myval\": 456}".getBytes());
+samplerResult.setResponseData("{\"myval\": 
456}".getBytes(Charset.defaultCharset()));
 AssertionResult result2 = instance.getResult(samplerResult);
 assertFalse(result2.isFailure());
 }
@@ -120,7 +121,7 @@ class TestJSONPathAssertion {
 @Test
 void testGetResult_positive_invert() {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": 123}".getBytes());
+samplerResult.setResponseData("{\"myval\": 
123}".getBytes(Charset.defaultCharset()));
 
 JSONPathAssertion instance = new JSONPathAssertion();
 instance.setJsonPath("$.myval");
@@ -136,7 +137,7 @@ class TestJSONPathAssertion {
 @Test
 void testGetResult_not_regexp() {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": \"some complicated 
value\"}".getBytes());
+samplerResult.setResponseData("{\"myval\": \"some complicated 
value\"}".getBytes(Charset.defaultCharset()));
 
 JSONPathAssertion instance = new JSONPathAssertion();
 instance.setJsonPath("$.myval");
@@ -153,7 +154,8 @@ class TestJSONPathAssertion {
 @Test
 void testGetResult_complex_map() {
 SampleResult samplerResult = new SampleResult();
-samplerResult.setResponseData("{\"myval\": { \"a\": 23, \"b\": 42, 
\&q

[jmeter] 15/16: Silence warnings in test code and use correct parameter when calling chained constructor

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 14ab8da63b820feb66ab1539cdab4976b77ae4e1
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:26:38 2022 +0200

Silence warnings in test code and use correct parameter when calling 
chained constructor

When chaining the constructor to add a default UA, we lost one parameter 
(replaced it
with another). That seems wrong, so I changed it back to the (hopefully) 
correct one.

While we are here, suppress a few other warnings from error prone, that 
can't be
fixed in a quick way. Feel free, to fix them.
---
 .../jmeter/protocol/http/parser/TestHTMLParser.java  | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
index 1566cbc601..8155eb1796 100644
--- 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
+++ 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
@@ -90,6 +90,7 @@ public class TestHTMLParser extends JMeterTestCaseJUnit 
implements Describable {
 }
 }
 
+@SuppressWarnings("ClassCanBeStatic")
 private class TestClass // Can't instantiate
 {
 private TestClass() {
@@ -99,7 +100,7 @@ public class TestHTMLParser extends JMeterTestCaseJUnit 
implements Describable {
 private static class TestData {
 private String fileName;
 
-private String baseURL;
+private String baseUrl;
 
 private String expectedSet;
 
@@ -113,10 +114,9 @@ public class TestHTMLParser extends JMeterTestCaseJUnit 
implements Describable {
  * @param baseUrl Base URL
  * @param expectedSet Set of expected URLs
  * @param expectedList List of expected URLs
- * @param userAgent User Agent
  */
 private TestData(String htmlFileName, String baseUrl, String 
expectedSet, String expectedList) {
-this(htmlFileName, baseUrl, expectedList, expectedList, 
DEFAULT_UA);
+this(htmlFileName, baseUrl, expectedSet, expectedList, DEFAULT_UA);
 }
 /**
  *
@@ -128,7 +128,7 @@ public class TestHTMLParser extends JMeterTestCaseJUnit 
implements Describable {
  */
 private TestData(String htmlFileName, String baseUrl, String 
expectedSet, String expectedList, String userAgent) {
 this.fileName = htmlFileName;
-this.baseURL = baseUrl;
+this.baseUrl = baseUrl;
 this.expectedSet = expectedSet;
 this.expectedList = expectedList;
 this.userAgent = userAgent;
@@ -359,26 +359,28 @@ public class TestHTMLParser extends JMeterTestCaseJUnit 
implements Describable {
 
 public void testParserSet() throws Exception {
 HTMLParser p = (HTMLParser) BaseParser.getParser(parserName);
-filetest(p, TESTS[testNumber].fileName, TESTS[testNumber].baseURL, 
TESTS[testNumber].expectedSet, null,
+filetest(p, TESTS[testNumber].fileName, TESTS[testNumber].baseUrl, 
TESTS[testNumber].expectedSet, null,
 false, TESTS[testNumber].userAgent);
 }
 
+@SuppressWarnings("JdkObsolete")
 public void testParserList() throws Exception {
 HTMLParser p = (HTMLParser) BaseParser.getParser(parserName);
-filetest(p, TESTS[testNumber].fileName, TESTS[testNumber].baseURL, 
TESTS[testNumber].expectedList,
+filetest(p, TESTS[testNumber].fileName, TESTS[testNumber].baseUrl, 
TESTS[testNumber].expectedList,
 new Vector(), true, TESTS[testNumber].userAgent);
 }
 
 public void testSpecificParserList() throws Exception {
 HTMLParser p = (HTMLParser) BaseParser.getParser(parserName);
 filetest(p, SPECIFIC_PARSER_TESTS[testNumber].fileName,
-SPECIFIC_PARSER_TESTS[testNumber].baseURL,
+SPECIFIC_PARSER_TESTS[testNumber].baseUrl,
 SPECIFIC_PARSER_TESTS[testNumber].expectedList,
 new ArrayList(), true,
 SPECIFIC_PARSER_TESTS[testNumber].userAgent);
 }
 
 
+@SuppressWarnings("URLEqualsHashCode")
 private static void filetest(HTMLParser p, String file, String url, String 
resultFile, Collection c,
 boolean orderMatters, // Does the order matter?
 String userAgent)



[jmeter] 11/16: Add override annotations to make error prone happy

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit ee2353ed1cf75ff87c17ce87fab66326d561821c
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:15:32 2022 +0200

Add override annotations to make error prone happy
---
 .../org/apache/jmeter/functions/TestJavascriptFunctionWithRhino.java| 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/src/functions/src/test/java/org/apache/jmeter/functions/TestJavascriptFunctionWithRhino.java
 
b/src/functions/src/test/java/org/apache/jmeter/functions/TestJavascriptFunctionWithRhino.java
index e302ac3a68..7b4f32b1db 100644
--- 
a/src/functions/src/test/java/org/apache/jmeter/functions/TestJavascriptFunctionWithRhino.java
+++ 
b/src/functions/src/test/java/org/apache/jmeter/functions/TestJavascriptFunctionWithRhino.java
@@ -25,12 +25,14 @@ import org.junit.jupiter.api.BeforeEach;
 public class TestJavascriptFunctionWithRhino extends TestJavascriptFunction {
 
 @BeforeEach
+@Override
 public void setUp() {
 JMeterUtils.getJMeterProperties().put("javascript.use_rhino", "true");
 super.setUp();
 }
 
 @AfterEach
+@Override
 public void tearDown() {
 JMeterUtils.getJMeterProperties().remove("javascript.use_rhino");
 }



[jmeter] 13/16: Suppress warnings about old date API

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 522b86aa89399b52ff9b2e89ba4be64a016ca638
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:22:52 2022 +0200

Suppress warnings about old date API

we have to use it here.
---
 src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java 
b/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java
index 2165b50992..adeef4002d 100644
--- a/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java
+++ b/src/jorphan/src/test/java/org/apache/jorphan/util/TestConverter.java
@@ -65,14 +65,14 @@ public class TestConverter {
 }
 
 @Test
-@SuppressWarnings({ "UndefinedEquals", "JdkObsolete" })
+@SuppressWarnings({ "UndefinedEquals", "JavaUtilDate" })
 public void testGetDateObjectDateWithTimeAndNullDefault() {
 Date time = new Date();
 assertEquals(time, Converter.getDate(time, null));
 }
 
 @Test
-@SuppressWarnings({ "UndefinedEquals", "JdkObsolete" })
+@SuppressWarnings({ "UndefinedEquals", "JavaUtilDate" })
 public void testGetDateObjectDateWithNullAndDateAsDefault() {
 Date date = new Date();
 assertEquals(date, Converter.getDate(null, date));



[jmeter] 07/16: Remove unused variable

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 32b03e9334a480fb2ef571bcbdf31168a339ac51
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:49:13 2022 +0200

Remove unused variable

Specify charset, when none is given and use isEmpty.
---
 .../PreciseThroughputTimerTest.java|  3 ---
 .../org/apache/jmeter/resources/PackageTest.java   | 26 +++---
 2 files changed, 8 insertions(+), 21 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/timers/poissonarrivals/PreciseThroughputTimerTest.java
 
b/src/components/src/test/java/org/apache/jmeter/timers/poissonarrivals/PreciseThroughputTimerTest.java
index ed5e973413..d6358fc40b 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/timers/poissonarrivals/PreciseThroughputTimerTest.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/timers/poissonarrivals/PreciseThroughputTimerTest.java
@@ -25,11 +25,8 @@ import java.util.Arrays;
 import java.util.Random;
 
 import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class PreciseThroughputTimerTest {
-private static final Logger LOG = 
LoggerFactory.getLogger(PreciseThroughputTimerTest.class);
 
 @Test
 public void testTimer1() throws Exception {
diff --git 
a/src/core/src/test/java/org/apache/jmeter/resources/PackageTest.java 
b/src/core/src/test/java/org/apache/jmeter/resources/PackageTest.java
index 116a27acd6..744cb69c8f 100644
--- a/src/core/src/test/java/org/apache/jmeter/resources/PackageTest.java
+++ b/src/core/src/test/java/org/apache/jmeter/resources/PackageTest.java
@@ -23,8 +23,7 @@ import java.io.FilenameFilter;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetEncoder;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -67,20 +66,12 @@ import junit.framework.TestSuite;
 
 public class PackageTest extends TestCase implements Describable {
 // We assume the test starts in "src/core" directory (which is true for 
Gradle and IDEs)
-private static final File srcFiledir = new File("src/main/java");
 private static final File resourceFiledir = new File("src/main/resources");
 
 private static final String MESSAGES = "messages";
 
 private static PropertyResourceBundle defaultPRB; // current default 
language properties file
 
-private static final CharsetEncoder ASCII_ENCODER =
-Charset.forName("US-ASCII").newEncoder(); // Ensure properties files 
don't use special characters
-
-private static boolean isPureAscii(String v) {
-  return ASCII_ENCODER.canEncode(v);
-}
-
 // Read resource into ResourceBundle and store in List
 private PropertyResourceBundle getRAS(String res) throws Exception {
 InputStream ras = this.getClass().getResourceAsStream(res);
@@ -97,16 +88,16 @@ public class PackageTest extends TestCase implements 
Describable {
 private void readRF(String res, List l) throws Exception {
 InputStream ras = this.getClass().getResourceAsStream(res);
 if (ras == null){
-if (MESSAGES.equals(resourcePrefix)|| lang.length() == 0 ) {
+if (MESSAGES.equals(resourcePrefix)|| lang.isEmpty()) {
 throw new IOException("Cannot open resource file "+res);
 } else {
 return;
 }
 }
-try (BufferedReader fileReader = new BufferedReader(new 
InputStreamReader(ras));) {
+try (BufferedReader fileReader = new BufferedReader(new 
InputStreamReader(ras, StandardCharsets.UTF_8))) {
 String s;
 while ((s = fileReader.readLine()) != null) {
-if (s.length() > 0 && !s.startsWith("#") && 
!s.startsWith("!")) {
+if (!s.isEmpty() && !s.startsWith("#") && !s.startsWith("!")) {
 int equ = s.indexOf('=');
 String key = s.substring(0, equ);
 if (resourcePrefix.equals(MESSAGES)){// Only relevant for 
messages
@@ -147,7 +138,7 @@ public class PackageTest extends TestCase implements 
Describable {
 
 // Helper method to construct resource name
 private String getResName(String lang) {
-if (lang.length() == 0) {
+if (lang.isEmpty()) {
 return resourcePrefix+".properties";
 } else {
 return resourcePrefix+"_" + lang + ".properties";
@@ -177,7 +168,7 @@ public class PackageTest extends TestCase implements 
Describable {
 last = curr;
 }
 
-if

[jmeter] 01/16: Correct mail address in changes.xml

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit ab461ecd4b2b4a432ce3bc6b5f1623c39dec532d
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:18:04 2022 +0200

Correct mail address in changes.xml
---
 xdocs/changes.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index a14681778a..39650534bd 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -217,7 +217,7 @@ however, the profile can't be updated while the test is 
running.
   692>Fix a few deprecation warnings for Gradle. Contributed by 
Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at aexp.com)
   697>Junit 5 tests to use asserts from Junit 5 API. Contributed 
by Sampath Kumar Krishnasamy (sampathkumar.krishnasamykuppusamy at 
aexp.com)
   65983707Use current screenshot for save-to-file 
listener in documentation. Based on patch by NaveenKumar Namachivayam 
(catch.nkn at gmail.com)
-  708Make errorprone happier. Based on patch by Wilson Kurniawan 
(wilson at visenze.comr)>
+  708Make errorprone happier. Based on patch by Wilson Kurniawan 
(wilson at visenze.com)>
 
 
  



[jmeter] 14/16: Suppress diverse warnings in test code

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit bcb2f2261c79a7c0c8e73b901d6f6c7b6f5ff4c7
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 17:23:48 2022 +0200

Suppress diverse warnings in test code

* It might not be nice to catch and print the stack trace, but it
  has been done this way for a long time. (Fix it, if you like)
* Get rid of unnecessary toString and with it a warning about default
  char encoding
---
 .../org/apache/jmeter/protocol/http/proxy/NonGuiProxySample.java  | 2 +-
 .../jmeter/protocol/mail/sampler/TestMailReaderSampler.java   | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/proxy/NonGuiProxySample.java
 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/proxy/NonGuiProxySample.java
index 696e731ae0..3af17cf158 100644
--- 
a/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/proxy/NonGuiProxySample.java
+++ 
b/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/proxy/NonGuiProxySample.java
@@ -78,7 +78,7 @@ public class NonGuiProxySample {
 try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
 SaveService.saveTree(treeModel.getTestPlan(), out);
 out.close();
-System.out.println(out.toString());
+System.out.println(out);
 }
 
 }
diff --git 
a/src/protocol/mail/src/test/java/org/apache/jmeter/protocol/mail/sampler/TestMailReaderSampler.java
 
b/src/protocol/mail/src/test/java/org/apache/jmeter/protocol/mail/sampler/TestMailReaderSampler.java
index 2298d0b058..406d55b998 100644
--- 
a/src/protocol/mail/src/test/java/org/apache/jmeter/protocol/mail/sampler/TestMailReaderSampler.java
+++ 
b/src/protocol/mail/src/test/java/org/apache/jmeter/protocol/mail/sampler/TestMailReaderSampler.java
@@ -17,18 +17,18 @@
 
 package org.apache.jmeter.protocol.mail.sampler;
 
-import static org.junit.Assert.assertEquals;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.Locale;
 import java.util.Properties;
 
 import org.apache.jmeter.util.JMeterUtils;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
 public class TestMailReaderSampler {
 
+@SuppressWarnings("CatchAndPrintStackTrace")
 public static void createJMeterEnv() {
 File propsFile;
 try {
@@ -51,7 +51,7 @@ public class TestMailReaderSampler {
 MailReaderSampler sampler = new MailReaderSampler();
 Properties properties = new Properties();
 sampler.addCustomProperties(properties);
-assertEquals(1, properties.size());
-assertEquals("mail.prop2.value", 
properties.getProperty("mail.prop2.name"));
+Assertions.assertEquals(1, properties.size());
+Assertions.assertEquals("mail.prop2.value", 
properties.getProperty("mail.prop2.name"));
 }
 }



[jmeter] 03/16: Make error prone happy by re-throwing catched exception

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit fb6322030f9bc1ea97160810c3f83f066544c47c
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 15:58:44 2022 +0200

Make error prone happy by re-throwing catched exception

and while we are here, update to junit5
and get rid of unused code
---
 .../apache/jmeter/control/TestIfController.java| 51 ++
 .../org/apache/jmeter/functions/PackageTest.java   | 25 ++-
 2 files changed, 27 insertions(+), 49 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/control/TestIfController.java 
b/src/components/src/test/java/org/apache/jmeter/control/TestIfController.java
index 1585eb8fa5..03805d42b0 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/control/TestIfController.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/control/TestIfController.java
@@ -17,10 +17,6 @@
 
 package org.apache.jmeter.control;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.fail;
-
 import org.apache.jmeter.config.Arguments;
 import org.apache.jmeter.junit.JMeterTestCase;
 import org.apache.jmeter.junit.stubs.TestSampler;
@@ -31,14 +27,15 @@ import org.apache.jmeter.testkit.BugId;
 import org.apache.jmeter.threads.JMeterContext;
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.JMeterVariables;
+import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
-public class TestIfController extends JMeterTestCase {
+class TestIfController extends JMeterTestCase {
 
 @BugId("56160")
 @Test
-public void testStackOverflow() throws Exception {
+void testStackOverflow() throws Exception {
 LoopController controller = new LoopController();
 controller.setLoops(1);
 controller.setContinueForever(false);
@@ -65,15 +62,15 @@ public class TestIfController extends JMeterTestCase {
 sampler.sample(null);
 counter++;
 }
-assertEquals(0, counter);
+Assertions.assertEquals(0, counter);
 } catch (StackOverflowError e) {
-fail("Stackoverflow occurred in testStackOverflow");
+throw new AssertionError("Stackoverflow occurred in 
testStackOverflow", e);
 }
 }
 
 @BugId("53768")
 @Test
-public void testBug53768() throws Exception {
+void testBug53768() throws Exception {
 LoopController controller = new LoopController();
 controller.setLoops(1);
 controller.setContinueForever(false);
@@ -125,19 +122,19 @@ public class TestIfController extends JMeterTestCase {
 
 Sampler sampler = controller.next();
 sampler.sample(null);
-assertEquals("0", vars.get("VAR1"));
+Assertions.assertEquals("0", vars.get("VAR1"));
 sampler = controller.next();
 sampler.sample(null);
-assertEquals("0", vars.get("VAR1"));
+Assertions.assertEquals("0", vars.get("VAR1"));
 
 } catch (StackOverflowError e) {
-fail("Stackoverflow occurred in testStackOverflow");
+throw new AssertionError("Stackoverflow occurred in 
testStackOverflow", e);
 }
 }
 
 @Test
 @Disabled
-public void testProcessing() throws Exception {
+void testProcessing() throws Exception {
 
 GenericController controller = new GenericController();
 
@@ -150,7 +147,7 @@ public class TestIfController extends JMeterTestCase {
 }
 
 @Test
-public void testProcessingTrue() throws Exception {
+void testProcessingTrue() throws Exception {
 LoopController controller = new LoopController();
 controller.setLoops(2);
 controller.addTestElement(new TestSampler("Sample1"));
@@ -170,14 +167,14 @@ public class TestIfController extends JMeterTestCase {
 Sampler sampler = null;
 while ((sampler = controller.next()) != null) {
 sampler.sample(null);
-assertEquals(order[counter], sampler.getName());
+Assertions.assertEquals(order[counter], sampler.getName());
 counter++;
 }
-assertEquals(counter, 6);
+Assertions.assertEquals(counter, 6);
 }
 
 @Test
-public void testProcessingTrueWithExpression() throws Exception {
+void testProcessingTrueWithExpression() throws Exception {
 LoopController controller = new LoopController();
 controller.setLoops(2);
 controller.addTestElement(new TestSampler("Sample1"));
@@ -198,10 +195,10 @@ public class Test

[jmeter] 08/16: Suppress warning about comparing references

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit d27bc1fb17ce7369a03ca0580c9763ae57112d86
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:52:50 2022 +0200

Suppress warning about comparing references

We really want to test for the same reference here.
---
 src/core/src/test/java/org/apache/jmeter/engine/TestTreeCloner.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/src/core/src/test/java/org/apache/jmeter/engine/TestTreeCloner.java 
b/src/core/src/test/java/org/apache/jmeter/engine/TestTreeCloner.java
index 53ce8e233d..143f5691c1 100644
--- a/src/core/src/test/java/org/apache/jmeter/engine/TestTreeCloner.java
+++ b/src/core/src/test/java/org/apache/jmeter/engine/TestTreeCloner.java
@@ -36,6 +36,7 @@ import org.junit.jupiter.api.Test;
 public class TestTreeCloner extends JMeterTestCase {
 
 @Test
+@SuppressWarnings("ReferenceEquality")
 public void testCloning() throws Exception {
 ListedHashTree original = new ListedHashTree();
 GenericController controller = new GenericController();



[jmeter] 06/16: Get rid of warning about converting long to float

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 1527a8fcb1c96b2270d215775687443dfadc480d
Author: Felix Schumacher 
AuthorDate: Mon Apr 18 16:42:41 2022 +0200

Get rid of warning about converting long to float

by introducing a new private assertion method.
While we are here, convert to junit5 and add another assertion method
to check vor valid range.
---
 .../jmeter/timers/ConstantThroughputTimerTest.java |  91 ++--
 .../apache/jmeter/samplers/TestSampleResult.java   | 160 +++--
 2 files changed, 130 insertions(+), 121 deletions(-)

diff --git 
a/src/components/src/test/java/org/apache/jmeter/timers/ConstantThroughputTimerTest.java
 
b/src/components/src/test/java/org/apache/jmeter/timers/ConstantThroughputTimerTest.java
index f8c8df1391..a55b4bae4a 100644
--- 
a/src/components/src/test/java/org/apache/jmeter/timers/ConstantThroughputTimerTest.java
+++ 
b/src/components/src/test/java/org/apache/jmeter/timers/ConstantThroughputTimerTest.java
@@ -17,32 +17,26 @@
 
 package org.apache.jmeter.timers;
 
-import static org.junit.Assert.assertEquals;
-
 import java.util.UUID;
 
 import org.apache.jmeter.threads.JMeterContextService;
 import org.apache.jmeter.threads.TestJMeterContextService;
 import org.apache.jmeter.util.BeanShellInterpreter;
 import org.apache.jmeter.util.ScriptingTestElement;
-import org.junit.Assert;
-import org.junit.Assume;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Assumptions;
 import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConstantThroughputTimerTest {
 
-private static final Logger log = 
LoggerFactory.getLogger(ConstantThroughputTimerTest.class);
+class ConstantThroughputTimerTest {
 
 @Test
-public void testTimer1() throws Exception {
+void testTimer1() throws Exception {
 ConstantThroughputTimer timer = new ConstantThroughputTimer();
-assertEquals(0,timer.getCalcMode());// Assume this thread only
+Assertions.assertEquals(0, timer.getCalcMode());// Assume this thread 
only
 timer.setThroughput(60.0);// 1 per second
 long start = System.currentTimeMillis();
 long delay = timer.delay(); // Initialise
-assertEquals(0,delay);
+Assertions.assertEquals(0, delay);
 // The test tries to check if the calculated delay is correct.
 // If the build machine is busy, then the sleep(500) may take longer in
 // which case the calculated delay should be shorter.
@@ -55,107 +49,120 @@ public class ConstantThroughputTimerTest {
 if (expected < 0) {
 expected = 0;
 }
-assertEquals("Expected delay of approx 500", expected, timer.delay(), 
50);
+assertAlmostEquals(expected, timer.delay(), 50);
 }
 
+private static void assertAlmostEquals(long expected, long actual, long 
delta) {
+long actualDelta = Math.abs(actual - expected);
+if (actualDelta > delta) {
+Assertions.fail(() -> "Expected " + expected + " within delta of " 
+ delta
++ ", but got " + actual + " which is a delta of " + 
actualDelta);
+}
+}
 @Test
-public void testTimer2() throws Exception {
+void testTimer2() throws Exception {
 ConstantThroughputTimer timer = new ConstantThroughputTimer();
-assertEquals(0,timer.getCalcMode());// Assume this thread only
+Assertions.assertEquals(0, timer.getCalcMode());// Assume this thread 
only
 timer.setThroughput(60.0);// 1 per second
-assertEquals(1000,timer.calculateCurrentTarget(0)); // Should delay 
for 1 second
+Assertions.assertEquals(1000, timer.calculateCurrentTarget(0)); // 
Should delay for 1 second
 timer.setThroughput(6.0);// 1 per milli-second
-assertEquals(1,timer.calculateCurrentTarget(0)); // Should delay for 1 
milli-second
+Assertions.assertEquals(1, timer.calculateCurrentTarget(0)); // Should 
delay for 1 milli-second
 }
 
 @Test
-public void testTimer3() throws Exception {
+void testTimer3() throws Exception {
 ConstantThroughputTimer timer = new ConstantThroughputTimer();
 timer.setMode(ConstantThroughputTimer.Mode.AllActiveThreads); 
//$NON-NLS-1$ - all threads
-assertEquals(1,timer.getCalcMode());// All threads
+Assertions.assertEquals(1, timer.getCalcMode());// All threads
 for(int i=1; i<=10; i++){
 TestJMeterContextService.incrNumberOfThreads();
 }
-assertEquals(10,JMeterContextService.getNumberOfThreads());
+Assertions.assertEquals(10, JMeterContextService.getNumberOfThreads());
 timer.setThroughput(600.0);// 10 per second
-assertEquals(1000,t

[jmeter] branch master updated (d8a6876169 -> 89f4a76c61)

2022-04-18 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from d8a6876169 Specify the char encoding when decoding bytes into strings
 new ab461ecd4b Correct mail address in changes.xml
 new 1e93c67a59 Get rid of error prone warnings because of missing explicit 
default character encoding
 new fb6322030f Make error prone happy by re-throwing catched exception
 new a91c28d82b Make error prone happier by using static inner class
 new b351b6df75 Silence warning about mutable enums
 new 1527a8fcb1 Get rid of warning about converting long to float
 new 32b03e9334 Remove unused variable
 new d27bc1fb17 Suppress warning about comparing references
 new cf4ae32816 Use ArrayList instead of LinkedList
 new 9fb66c4ab0 Use newer time API to make error prone happy
 new ee2353ed1c Add override annotations to make error prone happy
 new 16340ba1b8 Suppress warning about calling wait without a loop
 new 522b86aa89 Suppress warnings about old date API
 new bcb2f2261c Suppress diverse warnings in test code
 new 14ab8da63b Silence warnings in test code and use correct parameter 
when calling chained constructor
 new 89f4a76c61 Updated a few dependencies

The 16 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checksum.xml   |   3 +
 gradle.properties  |  26 +-
 .../jmeter/assertions/TestJSONPathAssertion.java   |  40 +--
 .../jmeter/assertions/XMLSchemaAssertionTest.java  |  31 ++-
 .../apache/jmeter/control/TestIfController.java|  51 ++--
 .../jmeter/control/TestTransactionController.java  |  12 +-
 .../jmeter/extractor/TestJSONPostProcessor.java|   3 +-
 .../json/jmespath/TestJMESPathExtractor.java   |   3 +-
 .../jmeter/timers/ConstantThroughputTimerTest.java |  91 ---
 .../PreciseThroughputTimerTest.java|   3 -
 .../test/java/org/apache/jmeter/JMeterTest.java|  11 +-
 .../jmeter/engine/DistributedRunnerTest.java   |   5 +-
 .../org/apache/jmeter/engine/TestTreeCloner.java   |   1 +
 .../gui/logging/TestGuiLogEventAppender.java   |   7 +-
 .../apache/jmeter/junit/JMeterTestCaseJUnit.java   |   4 +-
 .../org/apache/jmeter/resources/PackageTest.java   |  26 +-
 .../jmeter/resources/ResourceKeyUsageTest.java |   6 +-
 .../samplers/TestDataStrippingSampleSender.java|   2 +-
 .../apache/jmeter/samplers/TestSampleResult.java   | 160 ++--
 .../apache/jmeter/threads/TestJMeterThread.java|   6 +-
 .../jmeter/util/LogRecordingDelegatingLogger.java  |   4 +-
 .../java/org/apache/jmeter/junit/JMeterTest.java   |   4 +-
 .../org/apache/jmeter/save/TestSaveService.java|  10 +-
 src/dist/src/dist/expected_release_jars.csv|  34 +--
 .../org/apache/jmeter/functions/PackageTest.java   |  25 +-
 .../apache/jmeter/functions/SplitFunctionTest.java |   4 +-
 .../apache/jmeter/functions/SumFunctionTest.java   |  20 +-
 .../org/apache/jmeter/functions/Synchronizer.java  |   1 +
 .../apache/jmeter/functions/TestChangeCase.java|   4 +-
 .../functions/TestDateTimeConvertFunction.java |  36 +--
 .../jmeter/functions/TestDigestFunction.java   |  34 +--
 .../jmeter/functions/TestEscapeOroRegexpChars.java |  33 ++-
 .../apache/jmeter/functions/TestFileToString.java  |   4 +-
 .../jmeter/functions/TestGroovyFunction.java   |   4 +-
 .../apache/jmeter/functions/TestIsPropDefined.java |   4 +-
 .../apache/jmeter/functions/TestIsVarDefined.java  |  14 +-
 .../jmeter/functions/TestJavascriptFunction.java   |  32 +--
 .../functions/TestJavascriptFunctionWithRhino.java |   2 +
 .../apache/jmeter/functions/TestJexl2Function.java |  35 ++-
 .../apache/jmeter/functions/TestMachineIPName.java |  19 +-
 .../functions/TestRandomFromMultipleVars.java  |  24 +-
 .../apache/jmeter/functions/TestRegexFunction.java | 288 +++--
 .../jmeter/functions/TestSamplerNameFunction.java  |  19 +-
 .../apache/jmeter/functions/TestSetProperty.java   |   4 +-
 .../jmeter/functions/TestSimpleFunctions.java  |  25 +-
 .../apache/jmeter/functions/TestTimeFunction.java  |  80 +++---
 .../functions/TestTimeRandomDateFunction.java  |  46 ++--
 .../jmeter/functions/TestTimeShiftFunction.java|  20 +-
 .../jmeter/functions/TestUrlEncodeDecode.java  |  19 +-
 .../org/apache/jorphan/util/TestConverter.java |   4 +-
 .../protocol/http/control/TestAuthManager.java |  12 +-
 .../http/control/TestCacheManagerBase.java |  44 ++--
 .../control/TestCacheManagerThreadIteration.java   |  29 ++-
 .../protocol/http/parser/TestHTMLParser.java   |  16 +-
 .../protocol/http/proxy/NonGuiProxyS

[jmeter] branch master updated: Further silence error prone warnings

2022-04-13 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 8f8eb0f209 Further silence error prone warnings
8f8eb0f209 is described below

commit 8f8eb0f209bd6cd76fd9c5dd0173cb34c292d744
Author: Felix Schumacher 
AuthorDate: Wed Apr 13 15:55:02 2022 +0200

Further silence error prone warnings

Replace JdkObsolete with JavaUtilDate where we can't replace usage of new 
Date()
Use Instant and other newer APIs from java.time, where we can replace 
Date() without
changing our API.

And while we are here, we can get use some more isEmpty calls.

Part of #708
---
 .../visualizers/RespTimeGraphVisualizer.java   | 12 ---
 .../jmeter/visualizers/SamplerResultTab.java   | 12 ---
 .../src/main/java/org/apache/jmeter/JMeter.java| 38 ++
 .../org/apache/jmeter/report/core/TimeHelper.java  |  2 +-
 .../jmeter/report/dashboard/ReportGenerator.java   |  2 +-
 .../report/processor/NormalizerSampleConsumer.java |  2 +-
 .../org/apache/jmeter/reporters/ResultSaver.java   | 11 +++
 .../org/apache/jmeter/save/CSVSaveService.java |  4 +--
 .../jmeter/functions/DateTimeConvertFunction.java  | 18 ++
 .../org/apache/jmeter/functions/TimeFunction.java  | 16 +
 .../jmeter/protocol/http/control/CacheManager.java |  8 ++---
 .../protocol/http/control/HC4CookieHandler.java|  4 +--
 .../jmeter/protocol/http/proxy/ProxyControl.java   |  8 ++---
 .../protocol/jms/sampler/BaseJMSSampler.java   |  2 +-
 .../jmeter/protocol/jms/sampler/JMSSampler.java| 20 +---
 15 files changed, 95 insertions(+), 64 deletions(-)

diff --git 
a/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
 
b/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
index 03115a2ce9..a98701c052 100644
--- 
a/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
+++ 
b/src/components/src/main/java/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
@@ -23,9 +23,10 @@ import java.awt.Dimension;
 import java.awt.FlowLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -705,12 +706,13 @@ public class RespTimeGraphVisualizer extends 
AbstractVisualizer implements Actio
 return buttonPanel;
 }
 
-@SuppressWarnings("JdkObsolete")
 public String[] getXAxisLabels() {
-SimpleDateFormat formatter = new 
SimpleDateFormat(xAxisTimeFormat.getText()); //$NON-NLS-1$
+DateTimeFormatter formatter = DateTimeFormatter
+.ofPattern(xAxisTimeFormat.getText()) //$NON-NLS-1$
+.withZone(ZoneId.systemDefault());
 String[] xAxisLabels = new String[(int) durationTest]; // Test can't 
have a duration more than 2^31 secs (cast from long to int)
 for (int j = 0; j < durationTest; j++) {
-xAxisLabels[j] = formatter.format(new Date((minStartTime + j) * 
intervalValue));
+xAxisLabels[j] = 
formatter.format(Instant.ofEpochMilli((minStartTime + j) * intervalValue));
 }
 return xAxisLabels;
 }
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 5e1d4a0b83..f0115931e1 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
@@ -26,9 +26,9 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.Reader;
 import java.io.Writer;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
@@ -86,7 +86,9 @@ public abstract class SamplerResultTab implements 
ResultRenderer {
 
 private static final Logger LOGGER = 
LoggerFactory.getLogger(SamplerResultTab.class);
 // N.B. these are not multi-threaded, so don't make it static
-private final DateFormat dateFormat = new SimpleDateFormat("-MM-dd 
HH:mm:ss z"); // ISO format $NON-NLS-1$
+private final DateTimeFormatter dateFormat = DateTimeFormatter
+.ofPattern("-MM-dd HH:mm:ss z")  // ISO format $NON-NLS-1$
+.withZone(ZoneId.systemDefault());
 
 private static fina

[jmeter] 02/02: Suppress InlineMe warnings from error prone

2022-04-13 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit de43727474fe9c345e7cd57d0d9b2e01adc05a4d
Author: Felix Schumacher 
AuthorDate: Wed Apr 13 12:35:51 2022 +0200

Suppress InlineMe warnings from error prone

Part of #708
---
 build.gradle.kts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build.gradle.kts b/build.gradle.kts
index 8349f3c4d3..60b7e3b8aa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -403,6 +403,7 @@ allprojects {
 disable(
 "ComplexBooleanConstant",
 "EqualsGetClass",
+"InlineMeSuggester",
 "OperatorPrecedence",
 "MutableConstantField",
 // "ReferenceEquality",



[jmeter] branch master updated (9362e18340 -> de43727474)

2022-04-13 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 9362e18340 Replace java.util.Date with java.time based objects
 new aa13ae939f Further silence error prone warnings
 new de43727474 Suppress InlineMe warnings from error prone

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle.kts   |  1 +
 .../apache/jmeter/engine/DistributedRunner.java| 20 
 .../apache/jmeter/engine/StandardJMeterEngine.java | 28 --
 .../org/apache/jmeter/gui/util/JDateField.java |  4 ++--
 .../java/org/apache/jmeter/visualizers/Sample.java |  2 +-
 .../org/apache/jmeter/visualizers/TableSample.java |  2 +-
 6 files changed, 42 insertions(+), 15 deletions(-)



[jmeter] 01/02: Further silence error prone warnings

2022-04-13 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit aa13ae939f681590d4d2a8b99b3163b53cefdc0f
Author: Felix Schumacher 
AuthorDate: Wed Apr 13 12:35:10 2022 +0200

Further silence error prone warnings

Replace JdkObsolete with JavaUtilDate where we can't replace usage of new 
Date()
Use Instant and other newer APIs from java.time, where we can replace 
Date() without
changing our API.

Part of #708
---
 .../apache/jmeter/engine/DistributedRunner.java| 20 
 .../apache/jmeter/engine/StandardJMeterEngine.java | 28 --
 .../org/apache/jmeter/gui/util/JDateField.java |  4 ++--
 .../java/org/apache/jmeter/visualizers/Sample.java |  2 +-
 .../org/apache/jmeter/visualizers/TableSample.java |  2 +-
 5 files changed, 41 insertions(+), 15 deletions(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/engine/DistributedRunner.java 
b/src/core/src/main/java/org/apache/jmeter/engine/DistributedRunner.java
index 5ed86cbfc9..1ea5bca7bb 100644
--- a/src/core/src/main/java/org/apache/jmeter/engine/DistributedRunner.java
+++ b/src/core/src/main/java/org/apache/jmeter/engine/DistributedRunner.java
@@ -22,11 +22,15 @@ import java.io.OutputStream;
 import java.io.PrintStream;
 import java.rmi.NotBoundException;
 import java.rmi.RemoteException;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.time.format.FormatStyle;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Properties;
 
@@ -116,15 +120,23 @@ public class DistributedRunner {
 }
 }
 
+private static String formatLikeDate(Instant instant) {
+return DateTimeFormatter
+.ofLocalizedDateTime(FormatStyle.LONG)
+.withLocale(Locale.ROOT)
+.withZone(ZoneId.systemDefault())
+.format(instant);
+}
+
 /**
  * Starts a remote testing engines
  *
  * @param addresses list of the DNS names or IP addresses of the remote 
testing engines
  */
-@SuppressWarnings("JdkObsolete")
 public void start(List addresses) {
-long now = System.currentTimeMillis();
-println("Starting distributed test with remote engines: " + addresses 
+ " @ " + new Date(now) + " (" + now + ")");
+Instant now = Instant.now();
+println("Starting distributed test with remote engines: "
++ addresses + " @ " + formatLikeDate(now) + " (" + 
now.toEpochMilli() + ')');
 List startedEngines = new ArrayList<>(addresses.size());
 List failedEngines = new ArrayList<>(addresses.size());
 for (String address : addresses) {
diff --git 
a/src/core/src/main/java/org/apache/jmeter/engine/StandardJMeterEngine.java 
b/src/core/src/main/java/org/apache/jmeter/engine/StandardJMeterEngine.java
index aa1aae664b..a2a878341b 100644
--- a/src/core/src/main/java/org/apache/jmeter/engine/StandardJMeterEngine.java
+++ b/src/core/src/main/java/org/apache/jmeter/engine/StandardJMeterEngine.java
@@ -17,10 +17,14 @@
 
 package org.apache.jmeter.engine;
 
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.time.format.FormatStyle;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.Properties;
 import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.TimeUnit;
@@ -171,11 +175,12 @@ public class StandardJMeterEngine implements 
JMeterEngine, Runnable {
 }
 
 @Override
-@SuppressWarnings("JdkObsolete")
 public void runTest() throws JMeterEngineException {
 if (host != null){
-long now=System.currentTimeMillis();
-System.out.println("Starting the test on host " + host + " @ "+new 
Date(now)+" ("+now+")"); // NOSONAR Intentional
+Instant now = Instant.now();
+String nowAsString = formatLikeDate(now);
+System.out.println("Starting the test on host "  // NOSONAR 
Intentional
++ host + " @ " + nowAsString + " (" + now.toEpochMilli() + 
')');
 }
 try {
 Thread runningThread = new Thread(this, "StandardJMeterEngine");
@@ -186,6 +191,14 @@ public class StandardJMeterEngine implements JMeterEngine, 
Runnable {
 }
 }
 
+private String formatLikeDate(Instant instant) {
+return DateTimeFormatter
+.ofLocalizedDateTime(FormatStyle.LONG)
+

[jmeter] branch master updated: Replace java.util.Date with java.time based objects

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 9362e18340 Replace java.util.Date with java.time based objects
9362e18340 is described below

commit 9362e183409f7e8ff51e7b16ec8c9c081ea3e656
Author: Felix Schumacher 
AuthorDate: Tue Apr 12 20:51:18 2022 +0200

Replace java.util.Date with java.time based objects

Part of #708
---
 .../src/main/java/org/apache/jorphan/util/HeapDumper.java  | 10 +-
 .../main/java/org/apache/jorphan/util/ThreadDumper.java| 10 +-
 .../src/main/java/org/apache/jmeter/NewDriver.java | 14 +++---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java 
b/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
index fffaf7c9b5..eef6b52e46 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
@@ -19,8 +19,9 @@ package org.apache.jorphan.util;
 
 import java.io.File;
 import java.lang.management.ManagementFactory;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 
 import javax.management.InstanceNotFoundException;
 import javax.management.MBeanException;
@@ -159,10 +160,9 @@ public class HeapDumper {
  * @return the name of the dump file that was created
  * @throws Exception if the MXBean cannot be found, or if there is a 
problem during invocation
  */
-@SuppressWarnings("JavaUtilDate")
 public static String dumpHeap(File basedir, boolean live) throws Exception 
{
-SimpleDateFormat timestampFormat = new 
SimpleDateFormat("MMdd_hhmmss_SSS");
-String stamp = timestampFormat.format(new Date());
+DateTimeFormatter timestampFormat = 
DateTimeFormatter.ofPattern("MMdd_hhmmss_SSS").withZone(ZoneId.systemDefault());
+String stamp = timestampFormat.format(Instant.now());
 File temp = new File(basedir,"dump_"+stamp+".hprof");
 final String path = temp.getPath();
 dumpHeap(path, live);
diff --git 
a/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java 
b/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
index 3f572a22e3..d97cb65870 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
@@ -27,8 +27,9 @@ import java.lang.management.ManagementFactory;
 import java.lang.management.ThreadInfo;
 import java.lang.management.ThreadMXBean;
 import java.nio.charset.StandardCharsets;
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 
 /**
  * Utility class to create a Thread Dump
@@ -56,10 +57,9 @@ public class ThreadDumper {
  * @return Name of file containing thread dump
  * @throws Exception  if file cannot we written
  */
-@SuppressWarnings("JavaUtilDate")
 public static String threadDump(File basedir) throws Exception {
-SimpleDateFormat timestampFormat = new 
SimpleDateFormat("MMdd_hhmmss_SSS");
-String stamp = timestampFormat.format(new Date());
+DateTimeFormatter timestampFormat = 
DateTimeFormatter.ofPattern("MMdd_hhmmss_SSS").withZone(ZoneId.systemDefault());
+String stamp = timestampFormat.format(Instant.now());
 File temp = new File(basedir,"thread_dump_"+stamp+".log");
 final String path = temp.getPath();
 try (FileOutputStream fos = new FileOutputStream(temp);
diff --git a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java 
b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
index 91d609c5f7..95a5350154 100644
--- a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
+++ b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
@@ -18,6 +18,7 @@
 package org.apache.jmeter;
 
 // N.B. this must only use standard Java packages
+
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -25,10 +26,11 @@ import java.io.StringWriter;
 import java.lang.reflect.Method;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.List;
 import java.util.StringTokenizer;
 
@@ -344,19 +346,17 @@ public final class NewDriver {
 /*
  * If the fileName contains at least one s

[jmeter] branch master updated: Use a finer filter to disable warnings about java.util.Date

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new d9f775e8f8 Use a finer filter to disable warnings about java.util.Date
d9f775e8f8 is described below

commit d9f775e8f82a2584ad4360d092589ed9d31d5fa6
Author: Felix Schumacher 
AuthorDate: Tue Apr 12 20:31:33 2022 +0200

Use a finer filter to disable warnings about java.util.Date

and keep them locally

Part of #708
---
 src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java   | 2 +-
 src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java | 2 +-
 src/launcher/src/main/java/org/apache/jmeter/NewDriver.java | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java 
b/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
index 3f71f346dd..fffaf7c9b5 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/HeapDumper.java
@@ -159,7 +159,7 @@ public class HeapDumper {
  * @return the name of the dump file that was created
  * @throws Exception if the MXBean cannot be found, or if there is a 
problem during invocation
  */
-@SuppressWarnings("JdkObsolete")
+@SuppressWarnings("JavaUtilDate")
 public static String dumpHeap(File basedir, boolean live) throws Exception 
{
 SimpleDateFormat timestampFormat = new 
SimpleDateFormat("MMdd_hhmmss_SSS");
 String stamp = timestampFormat.format(new Date());
diff --git 
a/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java 
b/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
index 2c6762ee78..3f572a22e3 100644
--- a/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
+++ b/src/jorphan/src/main/java/org/apache/jorphan/util/ThreadDumper.java
@@ -56,7 +56,7 @@ public class ThreadDumper {
  * @return Name of file containing thread dump
  * @throws Exception  if file cannot we written
  */
-@SuppressWarnings("JdkObsolete")
+@SuppressWarnings("JavaUtilDate")
 public static String threadDump(File basedir) throws Exception {
 SimpleDateFormat timestampFormat = new 
SimpleDateFormat("MMdd_hhmmss_SSS");
 String stamp = timestampFormat.format(new Date());
diff --git a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java 
b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
index 99aff035a4..91d609c5f7 100644
--- a/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
+++ b/src/launcher/src/main/java/org/apache/jmeter/NewDriver.java
@@ -344,7 +344,7 @@ public final class NewDriver {
 /*
  * If the fileName contains at least one set of paired single-quotes, 
reformat using DateFormat
  */
-@SuppressWarnings("JdkObsolete")
+@SuppressWarnings("JavaUtilDate")
 private static String replaceDateFormatInFileName(String fileName) {
 try {
 StringBuilder builder = new StringBuilder();



[jmeter] 01/02: Add missing changelog entry for view hack

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit 530e05559b61a4aa91e4790215143f169542915c
Author: Felix Schumacher 
AuthorDate: Tue Apr 12 18:31:43 2022 +0200

Add missing changelog entry for view hack
---
 xdocs/changes.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index d7adf9d2ca..7534a8d46b 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -131,6 +131,8 @@ however, the profile can't be updated while the test is 
running.
 
   64988Sort properties and variables in a human expected order 
for DebugPostProcessor and DebugSampler
   63061Sort View Results in Table in a human expected order
+  706Try to keep UI responsive when displaying large text 
results. Can be configured with the new property
+  view.results.tree.simple_view_limit
 
 
 Timers, Assertions, Config, Pre-  Post-Processors



[jmeter] branch master updated (40de048e0e -> e457b35cbc)

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


from 40de048e0e Hack to make rendering of large text results faster
 new 530e05559b Add missing changelog entry for view hack
 new e457b35cbc Revert "Update ActiveMQ to 5.17.0"

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checksum.xml  | 1 -
 gradle.properties | 4 ++--
 xdocs/changes.xml | 4 +++-
 3 files changed, 5 insertions(+), 4 deletions(-)



[jmeter] 02/02: Revert "Update ActiveMQ to 5.17.0"

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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

commit e457b35cbc92af2a28dc73f5028cb0f142bba227
Author: Felix Schumacher 
AuthorDate: Tue Apr 12 18:31:48 2022 +0200

Revert "Update ActiveMQ to 5.17.0"

This reverts commit 76d1de31243a942591a107f6d58e030daa1e4d55.

Seems, that Java 9+ is needed. JMeter has to be able to run
with Java 8.
---
 checksum.xml  | 1 -
 gradle.properties | 4 ++--
 xdocs/changes.xml | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/checksum.xml b/checksum.xml
index 0a6f0a06c2..f0b151d799 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -88,7 +88,6 @@
 
 
 
-
 
 
 
diff --git a/gradle.properties b/gradle.properties
index 4cbbdfc605..6caea8bcf3 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.17.0
+activemq.version=5.16.4
 apache-rat.version=0.13
 apiguardian-api.version=1.1.0
 asm.version=9.2
@@ -130,7 +130,7 @@ rsyntaxtextarea.version=3.1.6
 Saxon-HE.version=11.2
 slf4j.version=1.7.36
 spock-core.version=2.0-M2-groovy-3.0
-springframework.version=5.3.18
+springframework.version=4.3.17.RELEASE
 svgSalamander.version=1.1.2.4
 tika.version=1.28.1
 xalan.version=2.7.2
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 7534a8d46b..321ee336dd 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.
   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.7.0 (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.3 (from 2.8.8).



[jmeter] branch master updated: Hack to make rendering of large text results faster

2022-04-12 Thread fschumacher
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 40de048e0e Hack to make rendering of large text results faster
40de048e0e is described below

commit 40de048e0edc23cfb78467747963a043ad6698c3
Author: Felix Schumacher 
AuthorDate: Sun Mar 20 16:27:18 2022 +0100

Hack to make rendering of large text results faster

Currently the used JEditorPane is slow when using large texts, as it
tries to find good places to break words.

This hack disables word wrapping by using non-wrapping views
for every element in the JEditorPane.

Introduce a new setting view.results.tree.simple_view_limit for view 
results tree

This setting is used to decide, whether the text view should switch to a 
simpler
view model. That can help to get rid of UI unresponsiveness on large 
contents.

Closes #706
---
 bin/jmeter.properties  |  5 ++
 .../jmeter/visualizers/SamplerResultTab.java   | 77 ++
 xdocs/usermanual/properties_reference.xml  |  6 ++
 3 files changed, 88 insertions(+)

diff --git a/bin/jmeter.properties b/bin/jmeter.properties
index 22994b683c..69b77d46bd 100644
--- a/bin/jmeter.properties
+++ b/bin/jmeter.properties
@@ -1195,6 +1195,11 @@ cookies=cookies
 #view.results.tree.max_line_size=11
 #view.results.tree.soft_wrap_line_size=10
 
+# Even with the above setting the UI can be unresponsive on large contents in 
the text view,
+# so we allow to switch to a simpler view mode, that is faster, but does not 
break lines.
+# Can be switched off by setting it to -1
+#view.results.tree.simple_view_limit=1
+
 # 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/SamplerResultTab.java
 
b/src/components/src/main/java/org/apache/jmeter/visualizers/SamplerResultTab.java
index 5a9afe4fad..5e1d4a0b83 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
@@ -21,6 +21,11 @@ import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Component;
 import java.awt.GridLayout;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -28,6 +33,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Set;
 
+import javax.swing.Action;
 import javax.swing.BorderFactory;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
@@ -43,11 +49,17 @@ import javax.swing.SwingConstants;
 import javax.swing.table.TableCellRenderer;
 import javax.swing.table.TableColumn;
 import javax.swing.text.BadLocationException;
+import javax.swing.text.Caret;
 import javax.swing.text.DefaultStyledDocument;
 import javax.swing.text.Document;
+import javax.swing.text.EditorKit;
+import javax.swing.text.Element;
+import javax.swing.text.PlainView;
 import javax.swing.text.Style;
 import javax.swing.text.StyleConstants;
 import javax.swing.text.StyledDocument;
+import javax.swing.text.View;
+import javax.swing.text.ViewFactory;
 
 import org.apache.jmeter.assertions.AssertionResult;
 import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer;
@@ -94,6 +106,9 @@ public abstract class SamplerResultTab implements 
ResultRenderer {
 
 private static final String STYLE_REDIRECT = "Redirect"; // $NON-NLS-1$
 
+private static final int SIMPLE_VIEW_LIMIT =
+JMeterUtils.getPropDefault("view.results.tree.simple_view_limit", 
10_000); // $NON-NLS-1$
+
 private JTextPane stats;
 
 /** Response Data pane */
@@ -694,7 +709,69 @@ public abstract class SamplerResultTab implements 
ResultRenderer {
 } catch (BadLocationException ex) {
 LOGGER.error("Error inserting text", ex);
 }
+if (SIMPLE_VIEW_LIMIT >= 0 && document.getLength() > 
SIMPLE_VIEW_LIMIT) {
+results.setEditorKit(new 
NonWrappingPlainTextEditorKit(results.getEditorKit()));
+}
 KerningOptimizer.INSTANCE.configureKerning(results, 
document.getLength());
 results.setDocument(document);
 }
+static class NonWrappingPlainTextEditorKit extends EditorKit {
+
+private final EditorKit delegate;
+
+NonWrappingPlainTextEditorKit(EditorKit delegate) {
+this.delegate = delegate;
+}
+
+@Override
+public String getContentType() {
+return delegate.getCo

  1   2   3   4   5   6   7   8   9   10   >