--- a/RegressionTests__WebSocketTest.st Fri Jan 31 17:09:51 2020 +0100
+++ b/RegressionTests__WebSocketTest.st Tue Feb 04 12:10:34 2020 +0100
@@ -285,6 +285,22 @@
"Created: / 27-01-2020 / 16:19:43 / Stefan Reise"
!
+assertOnEchoServer:data
+ |reply webSocket|
+
+ reply := HTTPInterface get:'ws://echo.websocket.org'.
+ self assert:reply isErrorResponse not.
+
+ webSocket := reply webSocket.
+ webSocket nextPut:data.
+
+ Delay waitForSeconds:5.
+
+ self assert:webSocket next = data.
+
+ "Created: / 04-02-2020 / 12:05:27 / Stefan Reise"
+!
+
communicationWithData:dataArrayOrData
doAssert:doAssert
@@ -777,6 +793,16 @@
"Created: / 22-01-2020 / 15:41:35 / Stefan Reise"
!
+testOnEchoServer
+ "/ empty (1) and big data (>5) is not supported by echo server
+ (self allData from:2 to:5) do:[:eachData |
+ self assertOnEchoServer:eachData.
+ ].
+
+ "Created: / 15-01-2020 / 15:55:27 / Stefan Reise"
+ "Modified: / 04-02-2020 / 12:09:52 / Stefan Reise"
+!
+
testParallelSocketWrite
"
!! call the following method in case the sockets did get corrupted !!
@@ -873,22 +899,6 @@
"Created: / 22-01-2020 / 15:48:52 / Stefan Reise"
! !
-!WebSocketTest methodsFor:'zzz'!
-
-testOnEchoServer
-"/ |rply|
-"/
-"/ rply := HTTPInterface get:'ws://echo.websocket.org'.
-"/ rply isErrorResponse ifTrue:[
-"/ self error:'failed to connect'.
-"/ ].
-"/
-"/ rply webSocket
-
- "Created: / 15-01-2020 / 15:55:27 / Stefan Reise"
- "Modified: / 21-01-2020 / 16:11:15 / Stefan Reise"
-! !
-
!WebSocketTest::DemoWebSocketService class methodsFor:'constants'!
defaultPort