@@ -26,9 +26,7 @@ import (
26
26
"sync"
27
27
"testing"
28
28
"time"
29
- )
30
29
31
- import (
32
30
"github.com/gorilla/websocket"
33
31
"github.com/stretchr/testify/assert"
34
32
)
@@ -130,11 +128,11 @@ func TestTCPClient(t *testing.T) {
130
128
131
129
assert .Equal (t , 1 , msgHandler .SessionNumber ())
132
130
ss := msgHandler .array [0 ]
133
- ss .SetSession (ss )
134
- _ , err = ss .Send ([]byte ("hello" ))
135
- assert .Nil (t , err )
136
- active := ss .GetActive ()
137
- assert .NotNil (t , active )
131
+ // ss.SetSession(ss)
132
+ // _, err = ss.Send([]byte("hello"))
133
+ // assert.Nil(t, err)
134
+ // active := ss.GetActive()
135
+ // assert.NotNil(t, active)
138
136
ss .SetCompressType (CompressNone )
139
137
conn := ss .(* session ).Connection .(* gettyTCPConn )
140
138
assert .True (t , conn .compress == CompressNone )
@@ -240,11 +238,11 @@ func TestUDPClient(t *testing.T) {
240
238
241
239
assert .Equal (t , 1 , msgHandler .SessionNumber ())
242
240
ss := msgHandler .array [0 ]
243
- ss .SetSession (ss )
244
- _ , err = ss .Send ([]byte ("hello" ))
245
- assert .NotNil (t , err )
246
- active := ss .GetActive ()
247
- assert .NotNil (t , active )
241
+ // ss.SetSession(ss)
242
+ // _, err = ss.Send([]byte("hello"))
243
+ // assert.NotNil(t, err)
244
+ // active := ss.GetActive()
245
+ // assert.NotNil(t, active)
248
246
totalLen , sendLen , err = ss .WritePkg (nil , 0 )
249
247
assert .NotNil (t , err )
250
248
assert .True (t , sendLen == 0 )
@@ -341,11 +339,11 @@ func TestNewWSClient(t *testing.T) {
341
339
l , err := conn .Send ("hello" )
342
340
assert .NotNil (t , err )
343
341
assert .True (t , l == 0 )
344
- ss .SetSession (ss )
345
- _ , err = ss .Send ([]byte ("hello" ))
346
- assert .Nil (t , err )
347
- active := ss .GetActive ()
348
- assert .NotNil (t , active )
342
+ // ss.SetSession(ss)
343
+ // _, err = ss.Send([]byte("hello"))
344
+ // assert.Nil(t, err)
345
+ // active := ss.GetActive()
346
+ // assert.NotNil(t, active)
349
347
beforeWriteBytes := conn .writeBytes
350
348
_ , err = conn .Send ([]byte ("hello" ))
351
349
assert .Nil (t , err )
0 commit comments