test
This commit is contained in:
parent
8c832fb584
commit
1c9129c1e3
|
@ -56,10 +56,10 @@ func testServer(t *testing.T) {
|
|||
}, func() {
|
||||
// 每次conn.Read前运行
|
||||
_ = conn.SetReadDeadline(time.Now().Add(10 * time.Second))
|
||||
}, func() {
|
||||
}, nil, func() {
|
||||
// 每次conn.Write前运行
|
||||
_ = conn.SetWriteDeadline(time.Now().Add(10 * time.Second))
|
||||
}, func() {
|
||||
}, nil, func() {
|
||||
// protocol状态更改为killed时运行
|
||||
_ = conn.Close()
|
||||
})
|
||||
|
@ -121,9 +121,9 @@ func testClient(t *testing.T) {
|
|||
return true
|
||||
}, func() {
|
||||
_ = conn.SetReadDeadline(time.Now().Add(10 * time.Second))
|
||||
}, func() {
|
||||
}, nil, func() {
|
||||
_ = conn.SetWriteDeadline(time.Now().Add(10 * time.Second))
|
||||
}, func() {
|
||||
}, nil, func() {
|
||||
_ = conn.Close()
|
||||
})
|
||||
protClient.SetHeartbeatInterval(3)
|
||||
|
|
Loading…
Reference in New Issue