You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/01/03 17:49:05 UTC

(tomcat) 09/16: Don't flag a test as skipped that is never going to be able to pass

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4913952a454c6a2ac3c9a6b419d92e545108bb11
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jan 3 10:42:01 2024 +0000

    Don't flag a test as skipped that is never going to be able to pass
---
 test/org/apache/tomcat/util/net/TestXxxEndpoint.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
index ea97bf8300..654da4fd2e 100644
--- a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
+++ b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
@@ -24,7 +24,6 @@ import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 
 import org.junit.Assert;
-import org.junit.Assume;
 import org.junit.Test;
 
 import org.apache.catalina.connector.Connector;
@@ -89,9 +88,12 @@ public class TestXxxEndpoint extends TomcatBaseTest {
     public void testUnixDomainSocket() throws Exception {
         Tomcat tomcat = getTomcatInstance();
         Connector c = tomcat.getConnector();
-        Assume.assumeTrue("NIO Unix domain sockets have to be supported for this test",
-                c.getProtocolHandlerClassName().contains("NioProtocol")
-                && JreCompat.isJre16Available());
+
+        if (!c.getProtocolHandlerClassName().contains("NioProtocol") || !JreCompat.isJre16Available()) {
+            // Only the NIO connector supports UnixDomainSockets
+            // and only when running on Java 16+
+            return;
+        }
 
         File tempPath = File.createTempFile("uds-tomcat-test-", ".sock");
         String unixDomainSocketPath = tempPath.getAbsolutePath();


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org