You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2023/06/08 08:55:50 UTC

[tomcat] branch 8.5.x updated (07647966c6 -> 8c4b1470a5)

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

remm pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from 07647966c6 Align with 9.0.x/10.1.x/11.0.x
     new 655dc06a3c Improve unreliable test (failures on Windows and Intel Mac)
     new 8c4b1470a5 tabs -> spaces

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/websocket/server/TestKeyHeader.java  | 5 +++++
 test/org/apache/tomcat/websocket/server/TesterWsClient.java | 4 ++++
 2 files changed, 9 insertions(+)


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


[tomcat] 01/02: Improve unreliable test (failures on Windows and Intel Mac)

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

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

commit 655dc06a3c88db113c5d1a3004264899b7e47c59
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 12 14:26:16 2023 +0100

    Improve unreliable test (failures on Windows and Intel Mac)
---
 test/org/apache/tomcat/websocket/server/TestKeyHeader.java  | 5 +++++
 test/org/apache/tomcat/websocket/server/TesterWsClient.java | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/test/org/apache/tomcat/websocket/server/TestKeyHeader.java b/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
index fa05e44304..de1b72711c 100644
--- a/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
+++ b/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
@@ -81,6 +81,11 @@ public class TestKeyHeader extends WebSocketBaseTest {
 
         if (expectedStatusCode == HttpServletResponse.SC_SWITCHING_PROTOCOLS) {
             client.sendCloseFrame(CloseCodes.NORMAL_CLOSURE);
+            // Read (and ignore) the response
+            byte[] buf = new byte[256];
+            while (client.read(buf) > 0) {
+            	// Ignore
+            }
         }
         client.closeSocket();
     }
diff --git a/test/org/apache/tomcat/websocket/server/TesterWsClient.java b/test/org/apache/tomcat/websocket/server/TesterWsClient.java
index 7a5c9c4ee0..c90aa23ed6 100644
--- a/test/org/apache/tomcat/websocket/server/TesterWsClient.java
+++ b/test/org/apache/tomcat/websocket/server/TesterWsClient.java
@@ -99,6 +99,10 @@ public class TesterWsClient {
         socket.close();
     }
 
+    public int read(byte[] bytes) throws IOException {
+        return socket.getInputStream().read(bytes);
+    }
+
     public void write(byte[] bytes) throws IOException {
         socket.getOutputStream().write(bytes);
         socket.getOutputStream().flush();


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


[tomcat] 02/02: tabs -> spaces

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

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

commit 8c4b1470a57697f4942f99935a08958ae9f90d7a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 12 16:26:02 2023 +0100

    tabs -> spaces
---
 test/org/apache/tomcat/websocket/server/TestKeyHeader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestKeyHeader.java b/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
index de1b72711c..bb8ab53476 100644
--- a/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
+++ b/test/org/apache/tomcat/websocket/server/TestKeyHeader.java
@@ -84,7 +84,7 @@ public class TestKeyHeader extends WebSocketBaseTest {
             // Read (and ignore) the response
             byte[] buf = new byte[256];
             while (client.read(buf) > 0) {
-            	// Ignore
+                // Ignore
             }
         }
         client.closeSocket();


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