This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push: new 63d72cf2c1 Speed up test execution 63d72cf2c1 is described below commit 63d72cf2c1fbf633a769aa093748f383cb92b5a7 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Jan 31 10:10:22 2025 +0000 Speed up test execution Skip timeouts where they can be skipped and reduce them where they can't. --- .../apache/tomcat/websocket/TestWebSocketFrameClientSSL.java | 10 +++++----- test/org/apache/tomcat/websocket/TesterFirehoseServer.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java index b815ccd508..25087c9dce 100644 --- a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java +++ b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java @@ -32,6 +32,8 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -191,11 +193,9 @@ public class TestWebSocketFrameClientSSL extends WebSocketBaseTest { Assert.fail("There are [" + openConnectionCount + "] connections still open"); } - // Set a short session close timeout (milliseconds) - wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); - // Close the client session. - wsSession.close(); + // Cast so we can force the session to be closed quickly. + CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); + ((WsSession) wsSession).doClose(cr, cr, true); } diff --git a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java index a903966c12..a09c4adac8 100644 --- a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java +++ b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java @@ -41,7 +41,7 @@ public class TesterFirehoseServer { public static final String MESSAGE; public static final int MESSAGE_SIZE = 1024; public static final int WAIT_TIME_MILLIS = 300000; - public static final int SEND_TIME_OUT_MILLIS = 5000; + public static final int SEND_TIME_OUT_MILLIS = 2000; public static final String PATH = "/firehose"; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org