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 dcad3922644dbb59cd30e0436ef9abbadb99bbf0 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Jan 8 12:06:19 2024 +0000 Refactor absolute performance tests so they do not run by default Absolute performance tests report the time taken to complete a series of actions. They cannot fail therefore do not run them as part of a standard test run. These tests are excluded by naming them Tester... --- ...erformance.java => TesterCompositeELResolverPerformance.java} | 6 +++++- ...ance.java => TesterScopedAttributeELResolverPerformance.java} | 6 +++++- ...TestRequestPerformance.java => TesterRequestPerformance.java} | 6 +++++- ...ormance.java => TesterApplicationHttpRequestPerformance.java} | 6 +++++- ...ormance.java => TesterDefaultInstanceManagerPerformance.java} | 9 +++++---- ...rmance.java => TesterAbstractFileResourceSetPerformance.java} | 6 +++++- ...PoolPerformance.java => TesterTagHandlerPoolPerformance.java} | 7 +++++-- ...ormance.java => TesterOneLineFormatterMillisPerformance.java} | 6 +++++- ...Performance.java => TesterFastHttpDateFormatPerformance.java} | 6 +++++- ...mitPerformance.java => TesterConnectionLimitPerformance.java} | 6 +++++- 10 files changed, 50 insertions(+), 14 deletions(-) diff --git a/test/javax/el/TestCompositeELResolverPerformance.java b/test/javax/el/TesterCompositeELResolverPerformance.java similarity index 88% rename from test/javax/el/TestCompositeELResolverPerformance.java rename to test/javax/el/TesterCompositeELResolverPerformance.java index b31907cab5..cd913c1d20 100644 --- a/test/javax/el/TestCompositeELResolverPerformance.java +++ b/test/javax/el/TesterCompositeELResolverPerformance.java @@ -18,7 +18,11 @@ package javax.el; import org.junit.Test; -public class TestCompositeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterCompositeELResolverPerformance { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=68119 diff --git a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java similarity index 87% rename from test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java rename to test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java index 9295155bd4..adaeabd010 100644 --- a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java +++ b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java @@ -25,7 +25,11 @@ import javax.servlet.jsp.TesterPageContext; import org.junit.Test; -public class TestScopedAttributeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterScopedAttributeELResolverPerformance { /* * With the caching of NotFound responses this test takes ~20ms. Without the diff --git a/test/org/apache/catalina/connector/TestRequestPerformance.java b/test/org/apache/catalina/connector/TesterRequestPerformance.java similarity index 87% rename from test/org/apache/catalina/connector/TestRequestPerformance.java rename to test/org/apache/catalina/connector/TesterRequestPerformance.java index 81a00829ce..42ec455051 100644 --- a/test/org/apache/catalina/connector/TestRequestPerformance.java +++ b/test/org/apache/catalina/connector/TesterRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterRequest; -public class TestRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterRequestPerformance { @Test public void localeParsePerformance() throws Exception { diff --git a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java similarity index 88% rename from test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java rename to test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java index 1592ceba2f..03d5932eb3 100644 --- a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java +++ b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.catalina.connector.Request; -public class TestApplicationHttpRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterApplicationHttpRequestPerformance { @Test public void testGetAttribute() { diff --git a/test/org/apache/catalina/core/TestDefaultInstanceManagerPerformance.java b/test/org/apache/catalina/core/TesterDefaultInstanceManagerPerformance.java similarity index 92% rename from test/org/apache/catalina/core/TestDefaultInstanceManagerPerformance.java rename to test/org/apache/catalina/core/TesterDefaultInstanceManagerPerformance.java index c496efeb08..cbea78df9c 100644 --- a/test/org/apache/catalina/core/TestDefaultInstanceManagerPerformance.java +++ b/test/org/apache/catalina/core/TesterDefaultInstanceManagerPerformance.java @@ -28,11 +28,12 @@ import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.InstanceManager; -public class TestDefaultInstanceManagerPerformance extends TomcatBaseTest { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterDefaultInstanceManagerPerformance extends TomcatBaseTest { - /* - * Performance test. Comment out @Ignore to run the test. - */ @Test public void testConcurrency() throws Exception { // Create a populated InstanceManager diff --git a/test/org/apache/catalina/webresources/TestAbstractFileResourceSetPerformance.java b/test/org/apache/catalina/webresources/TesterAbstractFileResourceSetPerformance.java similarity index 93% rename from test/org/apache/catalina/webresources/TestAbstractFileResourceSetPerformance.java rename to test/org/apache/catalina/webresources/TesterAbstractFileResourceSetPerformance.java index 5b17d116a1..7d66c129be 100644 --- a/test/org/apache/catalina/webresources/TestAbstractFileResourceSetPerformance.java +++ b/test/org/apache/catalina/webresources/TesterAbstractFileResourceSetPerformance.java @@ -20,7 +20,11 @@ import java.util.regex.Pattern; import org.junit.Test; -public class TestAbstractFileResourceSetPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterAbstractFileResourceSetPerformance { private static final Pattern UNSAFE_WINDOWS_FILENAME_PATTERN = Pattern.compile(" $|[\"<>]"); diff --git a/test/org/apache/jasper/runtime/TestTagHandlerPoolPerformance.java b/test/org/apache/jasper/runtime/TesterTagHandlerPoolPerformance.java similarity index 92% rename from test/org/apache/jasper/runtime/TestTagHandlerPoolPerformance.java rename to test/org/apache/jasper/runtime/TesterTagHandlerPoolPerformance.java index 41dd444b36..a810ac2443 100644 --- a/test/org/apache/jasper/runtime/TestTagHandlerPoolPerformance.java +++ b/test/org/apache/jasper/runtime/TesterTagHandlerPoolPerformance.java @@ -30,8 +30,11 @@ import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.unittest.TesterThreadedPerformance; import org.apache.tomcat.unittest.tags.Bug53545; - -public class TestTagHandlerPoolPerformance extends TomcatBaseTest { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterTagHandlerPoolPerformance extends TomcatBaseTest { @Test public void testConcurrency() throws Exception { diff --git a/test/org/apache/juli/TestOneLineFormatterMillisPerformance.java b/test/org/apache/juli/TesterOneLineFormatterMillisPerformance.java similarity index 92% rename from test/org/apache/juli/TestOneLineFormatterMillisPerformance.java rename to test/org/apache/juli/TesterOneLineFormatterMillisPerformance.java index b7c0cabd28..41dc3a8927 100644 --- a/test/org/apache/juli/TestOneLineFormatterMillisPerformance.java +++ b/test/org/apache/juli/TesterOneLineFormatterMillisPerformance.java @@ -25,8 +25,12 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ @RunWith(Parameterized.class) -public class TestOneLineFormatterMillisPerformance { +public class TesterOneLineFormatterMillisPerformance { @Parameterized.Parameters(name = "{index}: format[{0}]") public static Collection<Object[]> parameters() { diff --git a/test/org/apache/tomcat/util/http/TestFastHttpDateFormatPerformance.java b/test/org/apache/tomcat/util/http/TesterFastHttpDateFormatPerformance.java similarity index 89% rename from test/org/apache/tomcat/util/http/TestFastHttpDateFormatPerformance.java rename to test/org/apache/tomcat/util/http/TesterFastHttpDateFormatPerformance.java index ad3e176cfb..4d6e579e91 100644 --- a/test/org/apache/tomcat/util/http/TestFastHttpDateFormatPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterFastHttpDateFormatPerformance.java @@ -18,7 +18,11 @@ package org.apache.tomcat.util.http; import org.junit.Test; -public class TestFastHttpDateFormatPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterFastHttpDateFormatPerformance { @Test public void testGetCurrentDateConcurrent() throws InterruptedException { diff --git a/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java b/test/org/apache/tomcat/websocket/TesterConnectionLimitPerformance.java similarity index 93% rename from test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java rename to test/org/apache/tomcat/websocket/TesterConnectionLimitPerformance.java index df4b43e9ce..4d2a801e51 100644 --- a/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java +++ b/test/org/apache/tomcat/websocket/TesterConnectionLimitPerformance.java @@ -33,7 +33,11 @@ import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; -public class TestConnectionLimitPerformance extends TomcatBaseTest { +/* + * This test runs until the test machine runs out of resources. There is no benefit it running it as part of a standard + * test run so it is excluded due to the name starting Tester... + */ +public class TesterConnectionLimitPerformance extends TomcatBaseTest { /* * Simple test to see how many outgoing connections can be created on a single machine. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org