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 43a2f5591b814c3379e34d0d70e3281514d892de Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Jan 3 20:02:49 2024 +0000 Avoid skipped test reports for tests that can never pass --- test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java b/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java index e67cb6e285..7a858617c2 100644 --- a/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java +++ b/test/org/apache/tomcat/util/net/openssl/TestOpenSSLConf.java @@ -24,7 +24,6 @@ import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.junit.Assert; -import org.junit.Assume; import org.junit.Test; import org.apache.catalina.startup.Tomcat; @@ -62,8 +61,9 @@ public class TestOpenSSLConf extends TomcatBaseTest { if (!protocol.contains("Apr")) { String sslImplementation = String.valueOf( tomcat.getConnector().getProperty("sslImplementationName")); - Assume.assumeTrue("This test is only for OpenSSL based SSL connectors", - sslImplementation.contains("openssl")); + if (!sslImplementation.contains("openssl")) { + return null; + } } OpenSSLConf conf = new OpenSSLConf(); @@ -102,6 +102,9 @@ public class TestOpenSSLConf extends TomcatBaseTest { } else { sslHostConfig = initOpenSSLConfCmd("CipherString", ENABLED_CIPHER); } + if (sslHostConfig == null) { + return; + } String[] ciphers = sslHostConfig.getEnabledCiphers(); MatcherAssert.assertThat("Wrong HostConfig ciphers", ciphers, CoreMatchers.is(EXPECTED_CIPHERS)); @@ -134,6 +137,9 @@ public class TestOpenSSLConf extends TomcatBaseTest { sb.append(',').append(protocol); } SSLHostConfig sslHostConfig = initOpenSSLConfCmd("Protocol", sb.substring(1)); + if (sslHostConfig == null) { + return; + } String[] protocols = sslHostConfig.getEnabledProtocols(); for (String protocol : protocols) { Assert.assertFalse("Protocol " + protocol + " is not allowed", --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org