test
Test / testing (1.19.13, ubuntu-latest) (push) Successful in 3m10s Details
Test / testing (>=1.20, ubuntu-latest) (push) Successful in 4m5s Details

This commit is contained in:
Akvicor 2024-03-12 00:18:06 +08:00
parent 8c832fb584
commit 1c9129c1e3
1 changed files with 4 additions and 4 deletions

View File

@ -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)