This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 23a6810 Speed up unit tests. 23a6810 is described below commit 23a68103b10e07c20327cb6f9a23a451efe0ff67 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Mar 31 20:33:05 2020 +0100 Speed up unit tests. Only run TestCharsetUtil#testIsAcsiiSupersetAll() if a new Charset is detected. --- java/org/apache/tomcat/util/buf/CharsetCache.java | 2 ++ test/org/apache/tomcat/util/buf/TestCharsetUtil.java | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/tomcat/util/buf/CharsetCache.java b/java/org/apache/tomcat/util/buf/CharsetCache.java index 2f09168..3146d6a 100644 --- a/java/org/apache/tomcat/util/buf/CharsetCache.java +++ b/java/org/apache/tomcat/util/buf/CharsetCache.java @@ -152,6 +152,8 @@ public class CharsetCache { "ibm858", "x-ibm29626c", // Added from HPE JVM 1.8.0.17-hp-ux "cp1051", "cp1386", "cshproman8", "hp-roman8", "ibm-1051", "r8", "roman8", "roman9" + // If you add and entry to this list, ensure you run + // TestCharsetUtil#testIsAcsiiSupersetAll() }; private static final Charset DUMMY_CHARSET = new DummyCharset("Dummy", null); diff --git a/test/org/apache/tomcat/util/buf/TestCharsetUtil.java b/test/org/apache/tomcat/util/buf/TestCharsetUtil.java index ac996d1..2240d77 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetUtil.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetUtil.java @@ -46,8 +46,11 @@ public class TestCharsetUtil { /* * More comprehensive test that checks that, apart from where the encoding * overlaps with ASCII, no valid ASCII bytes are used. + * + * This is relatively slow. + * Only need to run this when we detect a new Charset. */ - @Test + //@Test public void testIsAcsiiSupersetAll() { for (Charset charset : Charset.availableCharsets().values()) { System.out.println("Testing: " + charset.name()); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org