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:54:16 UTC

[tomcat] branch 9.0.x updated (475f43bd1f -> 80f42f2d7f)

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

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


    from 475f43bd1f Code clean-up - formatting. No functional change.
     new 34d456d456 Improve unreliable test (failures on Windows and Intel Mac)
     new 80f42f2d7f 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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 34d456d45633d96af0bf8ec8a43e22fd35054d8f
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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 80f42f2d7f945cccebef100c2c825704b5a69984
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