This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.0.x by this push:
new d36f85b Possible fix for intermittent unit test failure
d36f85b is described below
commit d36f85b9679a9f0392eeb4850328f91092d096b6
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jul 9 17:36:32 2021 +0100
Possible fix for intermittent unit test failure
---
test/org/apache/tomcat/websocket/server/TestSlowClient.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/test/org/apache/tomcat/websocket/server/TestSlowClient.java
b/test/org/apache/tomcat/websocket/server/TestSlowClient.java
index 8c73608..53ac176 100644
--- a/test/org/apache/tomcat/websocket/server/TestSlowClient.java
+++ b/test/org/apache/tomcat/websocket/server/TestSlowClient.java
@@ -74,6 +74,11 @@ public class TestSlowClient extends WebSocketBaseTest {
// BZ 64848 (non-container thread variant)
// Confirm there are no waiting processors
AbstractProtocol<?> protocol = (AbstractProtocol<?>)
tomcat.getConnector().getProtocolHandler();
+ count = 0;
+ while (protocol.getWaitingProcessorCount() > 0 && count < 200) {
+ Thread.sleep(100);
+ count++;
+ }
Assert.assertEquals(0, protocol.getWaitingProcessorCount());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]