You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by vl...@apache.org on 2019/10/02 11:39:42 UTC

[jmeter] branch master updated: Support OpenJDK13 in TCP_TESTS: update exception message normalizer

This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov 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 8bc91b1  Support OpenJDK13 in TCP_TESTS: update exception message normalizer
8bc91b1 is described below

commit 8bc91b17c1aa8e3da86e735c61946c9c1a48b6a1
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Wed Oct 2 14:25:18 2019 +0300

    Support OpenJDK13 in TCP_TESTS: update exception message normalizer
    
    Java 8..11 produce java.net.ConnectException: Connection refused (Connection refused)
    Java 13 produces java.net.ConnectException: Connection refused
    
    The post-processing was intended to cut (Connnection refused) part in the parenthesis,
    however in case ( is missing it did cut the whole message after :
---
 .travis.yml                 | 4 +---
 bin/testfiles/TCP_TESTS.jmx | 6 +++---
 checksum.xml                | 1 +
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index c23f758..39de126 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -49,10 +49,8 @@ matrix:
       script:
         # ./gradlew wrapper task kills license header from gradle-wrapper.properties, so we use grep/echo to update the file
         - grep -v Sha256 gradle/wrapper/gradle-wrapper.properties | grep -v Url > gradle/wrapper/gradle-wrapper.properties2
-        - echo 'distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-6.0-20190929230024+0000-bin.zip' >> gradle/wrapper/gradle-wrapper.properties2
+        - echo 'distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-6.0-20191001230020+0000-bin.zip' >> gradle/wrapper/gradle-wrapper.properties2
         - mv gradle/wrapper/gradle-wrapper.properties2 gradle/wrapper/gradle-wrapper.properties
         - xvfb-run ./gradlew $SKIP_DIST_TASKS -PskipCheckstyle -PskipSpotless build createDist -PchecksumFailOn=never -PchecksumPrint=false
         # Show difference between the new dependencies and old ones. It is expected that new Gradle version might bring new dependencies
         - diff -u checksum.xml build/checksum/checksum.xml || true
-  allow_failures:
-    - jdk: openjdk13
diff --git a/bin/testfiles/TCP_TESTS.jmx b/bin/testfiles/TCP_TESTS.jmx
index addede7..903337e 100644
--- a/bin/testfiles/TCP_TESTS.jmx
+++ b/bin/testfiles/TCP_TESTS.jmx
@@ -390,9 +390,9 @@ vars.put(&quot;result_decoded&quot;, new String(hex.decode(prev.getResponseData(
             <stringProp name="script">String oldResponseMessage = prev.getResponseMessage();
 int indexOfParenthesis = oldResponseMessage.indexOf(&quot;(&quot;);
 if(indexOfParenthesis&gt;=0) {
-	prev.setResponseMessage(oldResponseMessage.substring(0, indexOfParenthesis).trim());
-} else {
-	indexOfParenthesis = oldResponseMessage.lastIndexOf(&quot;:&quot;);
+	// Replace &quot;java.net.ConnectException: Connection refused (Connection refused)&quot;
+	// with &quot;java.net.ConnectException: Connection refused&quot;
+	// OpenJDK 8..11 are known to produce the extra (Connection refused)
 	prev.setResponseMessage(oldResponseMessage.substring(0, indexOfParenthesis).trim());
 }
 </stringProp>
diff --git a/checksum.xml b/checksum.xml
index 53feae5..53d9eae 100644
--- a/checksum.xml
+++ b/checksum.xml
@@ -109,6 +109,7 @@
     <trusted-key id='8799af90c06efbbd' group='org.jdom' />
     <trusted-key id='bcf4173966770193' group='org.jetbrains' />
     <trusted-key id='379ce192d401ab61' group='org.jetbrains.intellij.deps' />
+    <trusted-key id='6a0975f8b1127b83' group='org.jetbrains.kotlin' />
     <trusted-key id='98fe03a974ce0a0b' group='org.jetbrains.kotlin' />
     <trusted-key id='379ce192d401ab61' group='org.jetbrains.kotlinx' />
     <trusted-key id='91ae1504568ec4dd' group='org.jodd' />