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 2020/04/08 14:48:31 UTC

[tomcat] branch master updated (8cdd497 -> 4c456b1)

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

markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from 8cdd497  Add an extra field to keep around the configured protocol
     new 01d748c  BZ 64311 - Prevent test from hanging if client fails to connect
     new 4c456b1  BZ 64311 Add debug logging to aid investigation of test failures

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java | 5 +++++
 1 file changed, 5 insertions(+)


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


[tomcat] 01/02: BZ 64311 - Prevent test from hanging if client fails to connect

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 01d748c1d51c5e568cdb3cc6540527708e7c3e59
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 8 15:46:01 2020 +0100

    BZ 64311 - Prevent test from hanging if client fails to connect
---
 test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
index 866ba77..b13b116 100644
--- a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
+++ b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
@@ -146,6 +146,9 @@ public class TestSocketServerAnyLocalAddress extends AbstractJniTest {
                 sock.close();
             } catch (Exception e) {
                 e.printStackTrace();
+                // Prevent the test from hanging on Socket.accept(serverSocket)
+                // if the client fails
+                Socket.shutdown(serverSocket, Socket.APR_SHUTDOWN_READWRITE);
             }
         }
 


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


[tomcat] 02/02: BZ 64311 Add debug logging to aid investigation of test failures

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4c456b17c49ef9bdeef49af96f273e07b9c5db00
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 8 15:47:47 2020 +0100

    BZ 64311 Add debug logging to aid investigation of test failures
---
 test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
index b13b116..e1f78d6 100644
--- a/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
+++ b/test/org/apache/tomcat/jni/TestSocketServerAnyLocalAddress.java
@@ -124,6 +124,7 @@ public class TestSocketServerAnyLocalAddress extends AbstractJniTest {
 
             try {
                 InetSocketAddress connectAddress = getConnectAddress(serverSocket);
+                System.out.println("Client attempting to connect to [" + connectAddress + "]");
                 java.net.Socket sock = new java.net.Socket();
                 sock.connect(connectAddress, TIMEOUT_MICROSECONDS);
                 sock.setSoTimeout(TIMEOUT_MICROSECONDS);
@@ -165,6 +166,7 @@ public class TestSocketServerAnyLocalAddress extends AbstractJniTest {
             } else {
                 localAddress = new InetSocketAddress("0.0.0.0", addr.port);
             }
+            System.out.println("Server is listening at [" + localAddress + "]");
 
             // Need a local address of the same type (IPv4 or IPV6) as the
             // configured bind address since the connector may be configured


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