From 39e1c33e2d9dc28ca56d0d0cc4557e598169f4f2 Mon Sep 17 00:00:00 2001 From: ruthes00 Date: Thu, 24 Sep 2026 03:35:12 -0400 Subject: [PATCH 1/2] Fixed bug in `SampleSaveConfiguration.java` where the static initializer used `TRUE` as the fallback default for `jmeter.save.saveservice.url` instead of `FALSE` --- bin/jmeter.properties | 2 +- bin/testfiles/jmeter-batch.properties | 3 --- .../samplers/SampleSaveConfiguration.java | 2 +- .../samplers/TestSampleSaveConfiguration.java | 19 +++++++++++++++++++ .../jmeter/save/TestCSVSaveService.java | 4 ++-- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/bin/jmeter.properties b/bin/jmeter.properties index dd4dd7eaacd..d93c871deea 100644 --- a/bin/jmeter.properties +++ b/bin/jmeter.properties @@ -529,7 +529,7 @@ remote_hosts=127.0.0.1 #jmeter.save.saveservice.bytes=true # Only available with HttpClient4 #jmeter.save.saveservice.sent_bytes=true -#jmeter.save.saveservice.url=true +#jmeter.save.saveservice.url=false #jmeter.save.saveservice.filename=false #jmeter.save.saveservice.hostname=false #jmeter.save.saveservice.thread_counts=true diff --git a/bin/testfiles/jmeter-batch.properties b/bin/testfiles/jmeter-batch.properties index a93d6f132a6..e352dc311a3 100644 --- a/bin/testfiles/jmeter-batch.properties +++ b/bin/testfiles/jmeter-batch.properties @@ -28,9 +28,6 @@ jmeter.save.saveservice.idle_time=false jmeter.save.saveservice.connect_time=false # Since JMeter 3.1, defaults for this property is true jmeter.save.saveservice.sent_bytes=false -# Since JMeter 5.0, defaults for this property is true -jmeter.save.saveservice.url=false - # add some context in case tests fail (.jtl files are not compared) jmeter.save.saveservice.responseHeaders=true jmeter.save.saveservice.output_format=xml diff --git a/src/core/src/main/java/org/apache/jmeter/samplers/SampleSaveConfiguration.java b/src/core/src/main/java/org/apache/jmeter/samplers/SampleSaveConfiguration.java index a3b3019cadf..cd9ec8a9489 100644 --- a/src/core/src/main/java/org/apache/jmeter/samplers/SampleSaveConfiguration.java +++ b/src/core/src/main/java/org/apache/jmeter/samplers/SampleSaveConfiguration.java @@ -332,7 +332,7 @@ public class SampleSaveConfiguration implements Cloneable, Serializable { SENT_BYTES = TRUE.equalsIgnoreCase(props.getProperty(SAVE_SENT_BYTES_PROP, TRUE)); - URL = TRUE.equalsIgnoreCase(props.getProperty(SAVE_URL_PROP, TRUE)); + URL = TRUE.equalsIgnoreCase(props.getProperty(SAVE_URL_PROP, FALSE)); FILE_NAME = TRUE.equalsIgnoreCase(props.getProperty(SAVE_FILENAME_PROP, FALSE)); diff --git a/src/core/src/test/java/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java b/src/core/src/test/java/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java index 0735445a2ff..07e888d87fc 100644 --- a/src/core/src/test/java/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java +++ b/src/core/src/test/java/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java @@ -155,6 +155,25 @@ public void testFormatter() throws Exception { assertTrue(a.strictDateFormatter().equals(b.strictDateFormatter()), "Objects should be equal"); } + /** + * Regression test for https://github.com/apache/jmeter/issues/6395 + *

+ * {@code jmeter.save.saveservice.url} must default to {@code false}. + * Prior to the fix the fallback value in the static initializer was {@code TRUE}, + * so the URL was always written to result files even when the property was absent. + */ + @Test + public void testUrlNotSavedByDefault() { + // The default SampleSaveConfiguration (no property override) must not save the URL. + SampleSaveConfiguration config = new SampleSaveConfiguration(); + assertFalse(config.saveUrl(), + "saveUrl() should be false by default (jmeter.save.saveservice.url defaults to false)"); + + // staticConfig() must agree with the instance default. + assertFalse(SampleSaveConfiguration.staticConfig().saveUrl(), + "staticConfig().saveUrl() should be false by default"); + } + @Test // Checks that all the saveXX() and setXXX(boolean) methods are in the list public void testSaveConfigNames() throws Exception { diff --git a/src/core/src/test/java/org/apache/jmeter/save/TestCSVSaveService.java b/src/core/src/test/java/org/apache/jmeter/save/TestCSVSaveService.java index 2bcf146922a..6c13ea79ad1 100644 --- a/src/core/src/test/java/org/apache/jmeter/save/TestCSVSaveService.java +++ b/src/core/src/test/java/org/apache/jmeter/save/TestCSVSaveService.java @@ -153,7 +153,7 @@ public void testShortFile() throws Exception { // if this test fails, check whether the default was intentionally changed or not public void testHeader() { final String HDR = "timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success," - + "failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect"; + + "failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect"; assertEquals(HDR, CSVSaveService.printableFieldNamesToString(), "Header text has changed"); } @@ -161,7 +161,7 @@ public void testHeader() { // sample format should not change unexpectedly // if this test fails, check whether the default was intentionally changed or not public void testSample() throws MalformedURLException { - final String RESULT = "1,2,3,4,5,6,7,true,,8,9,10,11,https://jmeter.apache.org,12,13,14"; + final String RESULT = "1,2,3,4,5,6,7,true,,8,9,10,11,12,13,14"; SampleResult result = new SampleResult(); result.setSaveConfig(new SampleSaveConfiguration()); result.setStampAndTime(1, 2); From 59a9656a7b165862e31a8477235afdc3ac180b81 Mon Sep 17 00:00:00 2001 From: ruthes00 Date: Thu, 24 Sep 2026 03:46:25 -0400 Subject: [PATCH 2/2] Fixed build break where the action gradle/actions/wrapper-validation is not allowed in apache/jmeter because all actions must be from a repository owned by your enterprise, created by GitHub, or match one of the patterns. --- .github/workflows/gradle-wrapper-validation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 78ee9d201e9..0910c38fd77 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -7,4 +7,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - uses: gradle/actions/wrapper-validation@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2 + - uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0