You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/01/16 17:50:00 UTC

[tomcat] 02/02: Disable test for Java 16 onwards since performance is comparable

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

markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 65a8fab1df7a37042819a24d04dad600d213ceda
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Nov 14 11:42:53 2022 +0000

    Disable test for Java 16 onwards since performance is comparable
---
 test/org/apache/tomcat/util/buf/TestMessageBytes.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/buf/TestMessageBytes.java b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
index 3311996394..4abc1b6374 100644
--- a/test/org/apache/tomcat/util/buf/TestMessageBytes.java
+++ b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
@@ -23,8 +23,11 @@ import java.nio.charset.CodingErrorAction;
 import java.nio.charset.StandardCharsets;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
+import org.apache.tomcat.util.compat.JreCompat;
+
 public class TestMessageBytes {
 
     private static final String CONVERSION_STRING =
@@ -100,6 +103,10 @@ public class TestMessageBytes {
      */
     @Test
     public void testConversionPerformance() {
+
+        // ISO_8859_1 conversion appears to be optimised in Java 16 onwards
+        Assume.assumeFalse(JreCompat.isJre16Available());
+
         long optimized = -1;
         long nonOptimized = -1;
 
@@ -110,7 +117,7 @@ public class TestMessageBytes {
          * once to run the test and once more in case of unexpected CI /GC
          * slowness. The test will exit early if possible.
          *
-         * MeesageBytes only optimises conversion for ISO_8859_1
+         * MessageBytes only optimises conversion for ISO_8859_1
          */
         for (int i = 0; i < 3; i++) {
             optimized = doTestOptimisedConversionPerformance();


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org