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

markt-asf 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 89a10d171b Close the client session in testLargeBatchedBlockingSend
89a10d171b is described below

commit 89a10d171b88c80480a0c3ae775c69dbb6226708
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 11:02:23 2026 +0000

    Close the client session in testLargeBatchedBlockingSend
    
    Leaving the client session open kept the shared client container registered
    with the background process manager, which the base class checks has 
stopped.
    
    Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---
 test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java 
b/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
index 1f586c46b7..4dc7071e66 100644
--- a/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
+++ b/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
@@ -281,11 +281,17 @@ public class TestWsRemoteEndpoint extends 
WebSocketBaseTest {
         };
 
         WebSocketContainer wsContainer = 
ContainerProvider.getWebSocketContainer();
-        wsContainer.connectToServer(endpoint, Builder.create().build(),
+        Session session = wsContainer.connectToServer(endpoint, 
Builder.create().build(),
                 new URI("ws://localhost:" + getPort() + 
LargeMessageEndpoint.PATH));
 
-        Assert.assertTrue(latch.await(30, TimeUnit.SECONDS));
-        Assert.assertEquals(LargeMessageEndpoint.SIZE, received.get());
+        try {
+            Assert.assertTrue(latch.await(30, TimeUnit.SECONDS));
+            Assert.assertEquals(LargeMessageEndpoint.SIZE, received.get());
+        } finally {
+            // Do not leave the client session open. It keeps the client 
container registered with the background
+            // process manager which the base class checks has stopped.
+            session.close();
+        }
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to