Author: markt
Date: Tue Aug 20 10:23:23 2013
New Revision: 1515761
URL: http://svn.apache.org/r1515761
Log:
Reduce a potential timing sensitivity
Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java?rev=1515761&r1=1515760&r2=1515761&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
(original)
+++
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java
Tue Aug 20 10:23:23 2013
@@ -161,7 +161,16 @@ public class TestEncodingDecoding extend
Assert.assertEquals(MESSAGE_ONE,
((MsgString) client.received.peek()).getData());
session.close();
- Thread.sleep(100);
+
+ // Should not take very long but some failures have been seen
+ i = 0;
+ while (i < 20) {
+ if (Server.isLifeCycleEventCalled(
+ MsgStringEncoder.class.getName()+":init")) {
+ break;
+ }
+ Thread.sleep(100);
+ }
Assert.assertTrue(Server.isLifeCycleEventCalled(
MsgStringEncoder.class.getName()+":init"));
Assert.assertTrue(Server.isLifeCycleEventCalled(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]