This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new e6a3a8ca2b Close the client session in testLargeBatchedBlockingSend
e6a3a8ca2b is described below
commit e6a3a8ca2bf3cd8456eeb2b1dee040edea89f3fe
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 11:02:21 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]