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

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


The following commit(s) were added to refs/heads/main by this push:
     new 2f67f71a8e Split test into multiple tests to improve parallel running
2f67f71a8e is described below

commit 2f67f71a8e6c1e1901ff1c7a0851a7d2694d1d3d
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Oct 20 18:08:50 2026 +0100

    Split test into multiple tests to improve parallel running
    
    Co-authored by: Codex / GPT-6.1-Sol-High
---
 ...tion_8_2.java => Http2Section_8_2BaseTest.java} | 13 ++++++----
 .../coyote/http2/TestHttp2Section_8_2_00To3F.java  | 29 ++++++++++++++++++++++
 .../coyote/http2/TestHttp2Section_8_2_40To7F.java  | 29 ++++++++++++++++++++++
 .../coyote/http2/TestHttp2Section_8_2_80ToBF.java  | 29 ++++++++++++++++++++++
 .../coyote/http2/TestHttp2Section_8_2_C0ToFF.java  | 29 ++++++++++++++++++++++
 5 files changed, 124 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_2.java 
b/test/org/apache/coyote/http2/Http2Section_8_2BaseTest.java
similarity index 91%
rename from test/org/apache/coyote/http2/TestHttp2Section_8_2.java
rename to test/org/apache/coyote/http2/Http2Section_8_2BaseTest.java
index e15875e9c2..4442fcfc77 100644
--- a/test/org/apache/coyote/http2/TestHttp2Section_8_2.java
+++ b/test/org/apache/coyote/http2/Http2Section_8_2BaseTest.java
@@ -33,19 +33,22 @@ import org.apache.tomcat.util.http.parser.HttpParser;
 
 /**
  * Unit tests for Section 8.2 of <a 
href="https://tools.ietf.org/html/rfc7540";>RFC 7540</a>.
+ * <p>
+ * The character ranges are split across concrete test classes so they can run 
in parallel.
  */
 @RunWith(Parameterized.class)
-public class TestHttp2Section_8_2 extends Http2TestBase {
+public abstract class Http2Section_8_2BaseTest extends Http2TestBase {
 
-    @Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4}")
-    public static Collection<Object[]> parameters() {
+    protected static Collection<Object[]> parameters(int startInclusive, int 
endExclusive) {
         Collection<Object[]> baseData = data();
 
         List<Object[]> parameterSets = new ArrayList<>();
         for (Object[] base : baseData) {
-            parameterSets.add(new Object[] { base[0], base[1], "x-test", 
"x-value", Boolean.TRUE });
+            if (startInclusive == 0) {
+                parameterSets.add(new Object[] { base[0], base[1], "x-test", 
"x-value", Boolean.TRUE });
+            }
             // Strings longer than 5 characters will be huffman encoded
-            for (char c = 0; c < 256; c++) {
+            for (char c = (char) startInclusive; c < endExclusive; c++) {
                 // HTTP/2 field names must be tokens and must be lower case
                 boolean valid = HttpParser.isToken(c) && 
!Character.isUpperCase(c);
                 // Non-Huffman field names
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_2_00To3F.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_2_00To3F.java
new file mode 100644
index 0000000000..d09e1bcff9
--- /dev/null
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_2_00To3F.java
@@ -0,0 +1,29 @@
+/*
+ *  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.coyote.http2;
+
+import java.util.Collection;
+
+import org.junit.runners.Parameterized;
+
+public class TestHttp2Section_8_2_00To3F extends Http2Section_8_2BaseTest {
+
+    @Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4}")
+    public static Collection<Object[]> parameters() {
+        return parameters(0x00, 0x40);
+    }
+}
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_2_40To7F.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_2_40To7F.java
new file mode 100644
index 0000000000..f0c5442aca
--- /dev/null
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_2_40To7F.java
@@ -0,0 +1,29 @@
+/*
+ *  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.coyote.http2;
+
+import java.util.Collection;
+
+import org.junit.runners.Parameterized;
+
+public class TestHttp2Section_8_2_40To7F extends Http2Section_8_2BaseTest {
+
+    @Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4}")
+    public static Collection<Object[]> parameters() {
+        return parameters(0x40, 0x80);
+    }
+}
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_2_80ToBF.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_2_80ToBF.java
new file mode 100644
index 0000000000..f0049533fb
--- /dev/null
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_2_80ToBF.java
@@ -0,0 +1,29 @@
+/*
+ *  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.coyote.http2;
+
+import java.util.Collection;
+
+import org.junit.runners.Parameterized;
+
+public class TestHttp2Section_8_2_80ToBF extends Http2Section_8_2BaseTest {
+
+    @Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4}")
+    public static Collection<Object[]> parameters() {
+        return parameters(0x80, 0xC0);
+    }
+}
diff --git a/test/org/apache/coyote/http2/TestHttp2Section_8_2_C0ToFF.java 
b/test/org/apache/coyote/http2/TestHttp2Section_8_2_C0ToFF.java
new file mode 100644
index 0000000000..4647ad579f
--- /dev/null
+++ b/test/org/apache/coyote/http2/TestHttp2Section_8_2_C0ToFF.java
@@ -0,0 +1,29 @@
+/*
+ *  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.coyote.http2;
+
+import java.util.Collection;
+
+import org.junit.runners.Parameterized;
+
+public class TestHttp2Section_8_2_C0ToFF extends Http2Section_8_2BaseTest {
+
+    @Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4}")
+    public static Collection<Object[]> parameters() {
+        return parameters(0xC0, 0x100);
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to