Skip to content

Commit 78060eb

Browse files
committed
Further refactor into smaller tests
This allows the test runs to complete more quickly on machines with large numbers of threads. Some of these tests were still executing for significant proportions of the overall test time after the other tests had finished. More, shorter tests allows increased parallelism for a greater proportion of the test run.
1 parent 59a2ce2 commit 78060eb

File tree

68 files changed

+3324
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3324
-260
lines changed

test/jakarta/servlet/http/TestHttpServletDoHeadValidWrite0.java renamed to test/jakarta/servlet/http/TestHttpServletDoHeadInvalidWrite0ValidWrite0.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* of an entire test run.
2929
*/
3030
@RunWith(Parameterized.class)
31-
public class TestHttpServletDoHeadValidWrite0 extends HttpServletDoHeadBaseTest {
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite0 extends HttpServletDoHeadBaseTest {
3232

3333
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
3434
public static Collection<Object[]> parameters() {
@@ -39,13 +39,11 @@ public static Collection<Object[]> parameters() {
3939
for (Boolean l : booleans) {
4040
for (Integer buf : BUFFERS) {
4141
for (Boolean w : booleans) {
42-
for (Integer c1 : COUNTS) {
43-
for (ResetType rt : ResetType.values()) {
44-
for (Boolean f : booleans) {
45-
parameterSets.add(new Object[] {
46-
base[0], base[1],
47-
l, buf, w, c1, rt, Integer.valueOf(0), f });
48-
}
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(0), f });
4947
}
5048
}
5149
}

test/jakarta/servlet/http/TestHttpServletDoHeadValidWrite1.java renamed to test/jakarta/servlet/http/TestHttpServletDoHeadInvalidWrite0ValidWrite1.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* of an entire test run.
2929
*/
3030
@RunWith(Parameterized.class)
31-
public class TestHttpServletDoHeadValidWrite1 extends HttpServletDoHeadBaseTest {
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite1 extends HttpServletDoHeadBaseTest {
3232

3333
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
3434
public static Collection<Object[]> parameters() {
@@ -39,13 +39,11 @@ public static Collection<Object[]> parameters() {
3939
for (Boolean l : booleans) {
4040
for (Integer buf : BUFFERS) {
4141
for (Boolean w : booleans) {
42-
for (Integer c1 : COUNTS) {
43-
for (ResetType rt : ResetType.values()) {
44-
for (Boolean f : booleans) {
45-
parameterSets.add(new Object[] {
46-
base[0], base[1],
47-
l, buf, w, c1, rt, Integer.valueOf(1), f });
48-
}
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(1), f });
4947
}
5048
}
5149
}

test/jakarta/servlet/http/TestHttpServletDoHeadValidWrite511.java renamed to test/jakarta/servlet/http/TestHttpServletDoHeadInvalidWrite0ValidWrite1023.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* of an entire test run.
2929
*/
3030
@RunWith(Parameterized.class)
31-
public class TestHttpServletDoHeadValidWrite511 extends HttpServletDoHeadBaseTest {
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite1023 extends HttpServletDoHeadBaseTest {
3232

3333
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
3434
public static Collection<Object[]> parameters() {
@@ -39,13 +39,11 @@ public static Collection<Object[]> parameters() {
3939
for (Boolean l : booleans) {
4040
for (Integer buf : BUFFERS) {
4141
for (Boolean w : booleans) {
42-
for (Integer c1 : COUNTS) {
43-
for (ResetType rt : ResetType.values()) {
44-
for (Boolean f : booleans) {
45-
parameterSets.add(new Object[] {
46-
base[0], base[1],
47-
l, buf, w, c1, rt, Integer.valueOf(511), f });
48-
}
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(1023), f });
4947
}
5048
}
5149
}

test/jakarta/servlet/http/TestHttpServletDoHeadValidWrite512.java renamed to test/jakarta/servlet/http/TestHttpServletDoHeadInvalidWrite0ValidWrite1024.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* of an entire test run.
2929
*/
3030
@RunWith(Parameterized.class)
31-
public class TestHttpServletDoHeadValidWrite512 extends HttpServletDoHeadBaseTest {
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite1024 extends HttpServletDoHeadBaseTest {
3232

3333
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
3434
public static Collection<Object[]> parameters() {
@@ -39,13 +39,11 @@ public static Collection<Object[]> parameters() {
3939
for (Boolean l : booleans) {
4040
for (Integer buf : BUFFERS) {
4141
for (Boolean w : booleans) {
42-
for (Integer c1 : COUNTS) {
43-
for (ResetType rt : ResetType.values()) {
44-
for (Boolean f : booleans) {
45-
parameterSets.add(new Object[] {
46-
base[0], base[1],
47-
l, buf, w, c1, rt, Integer.valueOf(512), f });
48-
}
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(1024), f });
4947
}
5048
}
5149
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package jakarta.servlet.http;
18+
19+
import java.util.ArrayList;
20+
import java.util.Collection;
21+
import java.util.List;
22+
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.Parameterized;
25+
26+
/*
27+
* Split into multiple tests as a single test takes so long it impacts the time
28+
* of an entire test run.
29+
*/
30+
@RunWith(Parameterized.class)
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite1025 extends HttpServletDoHeadBaseTest {
32+
33+
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
34+
public static Collection<Object[]> parameters() {
35+
Collection<Object[]> baseData = data();
36+
37+
List<Object[]> parameterSets = new ArrayList<>();
38+
for (Object[] base : baseData) {
39+
for (Boolean l : booleans) {
40+
for (Integer buf : BUFFERS) {
41+
for (Boolean w : booleans) {
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(1025), f });
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
return parameterSets;
54+
}
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package jakarta.servlet.http;
18+
19+
import java.util.ArrayList;
20+
import java.util.Collection;
21+
import java.util.List;
22+
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.Parameterized;
25+
26+
/*
27+
* Split into multiple tests as a single test takes so long it impacts the time
28+
* of an entire test run.
29+
*/
30+
@RunWith(Parameterized.class)
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite511 extends HttpServletDoHeadBaseTest {
32+
33+
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
34+
public static Collection<Object[]> parameters() {
35+
Collection<Object[]> baseData = data();
36+
37+
List<Object[]> parameterSets = new ArrayList<>();
38+
for (Object[] base : baseData) {
39+
for (Boolean l : booleans) {
40+
for (Integer buf : BUFFERS) {
41+
for (Boolean w : booleans) {
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(511), f });
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
return parameterSets;
54+
}
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package jakarta.servlet.http;
18+
19+
import java.util.ArrayList;
20+
import java.util.Collection;
21+
import java.util.List;
22+
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.Parameterized;
25+
26+
/*
27+
* Split into multiple tests as a single test takes so long it impacts the time
28+
* of an entire test run.
29+
*/
30+
@RunWith(Parameterized.class)
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite512 extends HttpServletDoHeadBaseTest {
32+
33+
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
34+
public static Collection<Object[]> parameters() {
35+
Collection<Object[]> baseData = data();
36+
37+
List<Object[]> parameterSets = new ArrayList<>();
38+
for (Object[] base : baseData) {
39+
for (Boolean l : booleans) {
40+
for (Integer buf : BUFFERS) {
41+
for (Boolean w : booleans) {
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(512), f });
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
return parameterSets;
54+
}
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package jakarta.servlet.http;
18+
19+
import java.util.ArrayList;
20+
import java.util.Collection;
21+
import java.util.List;
22+
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.Parameterized;
25+
26+
/*
27+
* Split into multiple tests as a single test takes so long it impacts the time
28+
* of an entire test run.
29+
*/
30+
@RunWith(Parameterized.class)
31+
public class TestHttpServletDoHeadInvalidWrite0ValidWrite513 extends HttpServletDoHeadBaseTest {
32+
33+
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
34+
public static Collection<Object[]> parameters() {
35+
Collection<Object[]> baseData = data();
36+
37+
List<Object[]> parameterSets = new ArrayList<>();
38+
for (Object[] base : baseData) {
39+
for (Boolean l : booleans) {
40+
for (Integer buf : BUFFERS) {
41+
for (Boolean w : booleans) {
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(0), rt, Integer.valueOf(513), f });
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
return parameterSets;
54+
}
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package jakarta.servlet.http;
18+
19+
import java.util.ArrayList;
20+
import java.util.Collection;
21+
import java.util.List;
22+
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.Parameterized;
25+
26+
/*
27+
* Split into multiple tests as a single test takes so long it impacts the time
28+
* of an entire test run.
29+
*/
30+
@RunWith(Parameterized.class)
31+
public class TestHttpServletDoHeadInvalidWrite1023ValidWrite0 extends HttpServletDoHeadBaseTest {
32+
33+
@Parameterized.Parameters(name = "{index}: {0} {1} {2} {3} {4} {5} {6} {7} {8}")
34+
public static Collection<Object[]> parameters() {
35+
Collection<Object[]> baseData = data();
36+
37+
List<Object[]> parameterSets = new ArrayList<>();
38+
for (Object[] base : baseData) {
39+
for (Boolean l : booleans) {
40+
for (Integer buf : BUFFERS) {
41+
for (Boolean w : booleans) {
42+
for (ResetType rt : ResetType.values()) {
43+
for (Boolean f : booleans) {
44+
parameterSets.add(new Object[] {
45+
base[0], base[1],
46+
l, buf, w, Integer.valueOf(1023), rt, Integer.valueOf(0), f });
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
return parameterSets;
54+
}
55+
}

0 commit comments

Comments
 (0)