[doc] 测试用例调整

This commit is contained in:
what 2023-05-30 17:54:30 +08:00
parent 050c77a5f7
commit d8f58df39a

View File

@ -92,6 +92,9 @@ func TestInvokeBidiStream(t *testing.T) {
flag := make(chan bool) flag := make(chan bool)
go func() { go func() {
timer := time.NewTimer(time.Second)
defer timer.Stop()
for { for {
select { select {
case msg := <-recv: case msg := <-recv:
@ -102,9 +105,11 @@ func TestInvokeBidiStream(t *testing.T) {
} }
flag <- true flag <- true
return return
case <-time.After(time.Second): case <-timer.C:
resp.Cancel() resp.Cancel()
timer.Reset(time.Second)
} }
} }
}() }()