[doc] 测试用例调整
This commit is contained in:
parent
050c77a5f7
commit
d8f58df39a
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user