This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new bcb62c6 Beautify test
bcb62c6 is described below
commit bcb62c6e3fab70d8f1c1dd26fc4554a0a15e896b
Author: remm <[email protected]>
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 efc4dd1..f270258 100644
--- a/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
+++ b/test/org/apache/tomcat/util/net/TestXxxEndpoint.java
@@ -213,12 +213,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: [email protected]
For additional commands, e-mail: [email protected]