This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 851534b Beautify test 851534b is described below commit 851534bc66f5929b29dfd9d89ef27eed38a86968 Author: remm <r...@apache.org> AuthorDate: Wed Jun 30 22:07:55 2021 +0200 Beautify test --- test/org/apache/tomcat/util/net/TestXxxEndpoint.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java index c094480..0c23787 100644 --- a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java +++ b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java @@ -204,12 +204,14 @@ public class TestXxxEndpoint extends TomcatBaseTest { c.getProtocolHandlerClassName().contains("NioProtocol") && JreCompat.isJre16Available()); - File tempPath = File.createTempFile("tomcat", ".uds"); - final String unixDomainSocketPath = tempPath.getAbsolutePath(); - tempPath.delete(); + File tempPath = File.createTempFile("uds-tomcat-test-", ".sock"); + String unixDomainSocketPath = tempPath.getAbsolutePath(); + // Need to delete the file to make way for the actual socket + Assert.assertTrue(tempPath.delete()); Assert.assertTrue(c.setProperty("unixDomainSocketPath", unixDomainSocketPath)); tomcat.start(); + // Connect to the domain socket as a client SocketAddress sa = JreCompat.getInstance().getUnixDomainSocketAddress(unixDomainSocketPath); ByteBuffer response = ByteBuffer.allocate(1024); try (SocketChannel socket = JreCompat.getInstance().openUnixDomainSocketChannel()) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org