Author: markt Date: Wed Feb 24 20:45:26 2016 New Revision: 1732227 URL: http://svn.apache.org/viewvc?rev=1732227&view=rev Log: REconfigure the tests so that they pass with NIO2 as well. NIO2 relies on the write timeout to signal an error condition and the test wasn't waiting long enough for the timeout to occur.
Modified: tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java Modified: tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java?rev=1732227&r1=1732226&r2=1732227&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java (original) +++ tomcat/tc8.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java Wed Feb 24 20:45:26 2016 @@ -81,7 +81,7 @@ public class TestClose extends TomcatBas private static void awaitLatch(CountDownLatch latch, String failMessage) { try { - if (!latch.await(5000, TimeUnit.MILLISECONDS)) { + if (!latch.await(30000, TimeUnit.MILLISECONDS)) { Assert.fail(failMessage); } } catch (InterruptedException e) { @@ -270,7 +270,9 @@ public class TestClose extends TomcatBas public static class TestEndpoint { @OnOpen - public void onOpen() { + public void onOpen(Session session) { + session.getUserProperties().put( + "org.apache.tomcat.websocket.BLOCKING_SEND_TIMEOUT", Long.valueOf(3000)); log.info("Session opened"); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org