Author: markt
Date: Fri Dec 11 10:29:03 2015
New Revision: 1719332
URL: http://svn.apache.org/viewvc?rev=1719332&view=rev
Log:
Remove invalid test.
>From section 2.1.5 of the WebSocket 1.1 specification:
"If the close was initiated by the remote peer, the implementation must use the
close code and reason sent in the WebSocket protocol close frame."
So even though the sending of the server's close frame fails, the server
endpoint still must see the close code from the client.
Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestClose.java
Modified: tomcat/trunk/test/org/apache/tomcat/websocket/server/TestClose.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestClose.java?rev=1719332&r1=1719331&r2=1719332&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/websocket/server/TestClose.java
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/server/TestClose.java Fri Dec
11 10:29:03 2015
@@ -215,23 +215,6 @@ public class TestClose extends TomcatBas
@Test
- public void testWsCloseThenTcpResetInOnMessage() throws Exception {
- startServer(TestEndpointConfig.class);
-
- TesterWsCloseClient client = new TesterWsCloseClient("localhost",
getPort());
- client.httpUpgrade(BaseEndpointConfig.PATH);
- client.sendMessage("Test");
- awaitLatch(events.onMessageCalled, "onMessage not called");
-
- client.sendCloseFrame(CloseCodes.NORMAL_CLOSURE);
- client.closeSocket();
- events.onMessageWait.countDown();
-
- awaitOnClose(CloseCodes.CLOSED_ABNORMALLY);
- }
-
-
- @Test
public void testTcpCloseWhenOnMessageSends() throws Exception {
events.onMessageSends = true;
testTcpCloseInOnMessage();
@@ -255,7 +238,18 @@ public class TestClose extends TomcatBas
@Test
public void testWsCloseThenTcpResetWhenOnMessageSends() throws Exception {
events.onMessageSends = true;
- testWsCloseThenTcpResetInOnMessage();
+ startServer(TestEndpointConfig.class);
+
+ TesterWsCloseClient client = new TesterWsCloseClient("localhost",
getPort());
+ client.httpUpgrade(BaseEndpointConfig.PATH);
+ client.sendMessage("Test");
+ awaitLatch(events.onMessageCalled, "onMessage not called");
+
+ client.sendCloseFrame(CloseCodes.NORMAL_CLOSURE);
+ client.closeSocket();
+ events.onMessageWait.countDown();
+
+ awaitOnClose(CloseCodes.CLOSED_ABNORMALLY);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]