[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)
go func() {
timer := time.NewTimer(time.Second)
defer timer.Stop()
for {
select {
case msg := <-recv:
@ -102,9 +105,11 @@ func TestInvokeBidiStream(t *testing.T) {
}
flag <- true
return
case <-time.After(time.Second):
case <-timer.C:
resp.Cancel()
timer.Reset(time.Second)
}
}
}()