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