@@ -20,7 +20,7 @@ public class ClusterWSTest {
2020
2121 @ Before
2222 public void init () {
23- mClusterWS = new ClusterWS ("ws://localhost:80 " );
23+ mClusterWS = new ClusterWS ("ws://localhost:3000 " );
2424 receivedData = null ;
2525 gotTheData = false ;
2626 }
@@ -36,7 +36,7 @@ public void connect() throws Exception {
3636 mClusterWS .connect ();
3737 Thread .sleep (1000 );
3838
39- assertEquals ("Socket did not connect" , WebSocket .READYSTATE .OPEN ,mClusterWS .getState ());
39+ assertEquals ("Socket did not connect" , WebSocket .READYSTATE .OPEN , mClusterWS .getState ());
4040 }
4141
4242 @ Test
@@ -233,24 +233,24 @@ public void onDisconnected(int code, String reason) {
233233 }
234234
235235 @ Test
236- public void testReconnection () throws Exception {
237- mClusterWS .setReconnection (true ,1000 ,2000 ,null );
236+ public void testReconnection () throws Exception {
237+ mClusterWS .setReconnection (true , 1000 , 2000 , null );
238238 mClusterWS .connect ();
239239 Thread .sleep (1000 );
240- mClusterWS .disconnect (3002 ,"test" );
241- Thread .sleep (2000 );
240+ mClusterWS .disconnect (3002 , "test" );
241+ Thread .sleep (4000 );
242242 assertEquals ("Did not reconnect" , WebSocket .READYSTATE .OPEN , mClusterWS .getState ());
243243 }
244244
245245 @ Test
246- public void testPingPong () throws Exception {
246+ public void testPingPong () throws Exception {
247247 mClusterWS .connect ();
248248 Thread .sleep (1900 );
249- assertEquals ("Websocket disconnected" , WebSocket .READYSTATE .OPEN ,mClusterWS .getState ());
249+ assertEquals ("Websocket disconnected" , WebSocket .READYSTATE .OPEN , mClusterWS .getState ());
250250 }
251251
252252 @ Test (expected = NullPointerException .class )
253- public void testNullUrl () throws Exception {
253+ public void testNullUrl () throws Exception {
254254 mClusterWS = new ClusterWS (null );
255255 }
256256
0 commit comments