This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 5de575ad90 Close the client session in testLargeBatchedBlockingSend
5de575ad90 is described below
commit 5de575ad90d3ebd99f1be011845e4405209c2240
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Dec 2 11:02:25 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 2476209baa..a8b2c12e42 100644
--- a/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
+++ b/test/org/apache/tomcat/websocket/TestWsRemoteEndpoint.java
@@ -275,11 +275,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]