You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/02/02 10:59:42 UTC

svn commit: r1728064 - /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java

Author: markt
Date: Tue Feb  2 09:59:42 2016
New Revision: 1728064

URL: http://svn.apache.org/viewvc?rev=1728064&view=rev
Log:
Back-port test fixes from 8.0.x

Modified:
    tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java

Modified: tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java?rev=1728064&r1=1728063&r2=1728064&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/server/TestClose.java Tue Feb  2 09:59:42 2016
@@ -244,7 +244,8 @@ public class TestClose extends TomcatBas
         client.closeSocket();
         events.onMessageWait.countDown();
 
-        awaitOnClose(CloseCodes.CLOSED_ABNORMALLY);
+        // BIO will see close from client before it sees the TCP close
+        awaitOnClose(CloseCodes.CLOSED_ABNORMALLY, CloseCodes.NORMAL_CLOSURE);
     }
 
 
@@ -260,7 +261,7 @@ public class TestClose extends TomcatBas
         awaitLatch(events.onMessageCalled, "onMessage not called");
 
         client.sendCloseFrame(CloseCodes.NORMAL_CLOSURE);
-        client.closeSocket();
+        client.forceCloseSocket();
         events.onMessageWait.countDown();
 
         awaitOnClose(CloseCodes.CLOSED_ABNORMALLY);
@@ -291,7 +292,7 @@ public class TestClose extends TomcatBas
 
         @OnError
         public void onError(Throwable t) {
-            log.info("onError: " + t.getMessage());
+            log.info("onError", t);
             events.onErrorThrowable = t;
             events.onErrorCalled.countDown();
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org