This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new c813b5a Speed up unit tests.
c813b5a is described below
commit c813b5a4ea6c4fa3d097d41b49b431e29b3cb6ec
Author: Mark Thomas <[email protected]>
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 b6b7790..309f415 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, part 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: [email protected]
For additional commands, e-mail: [email protected]