collect errors from condition in defer

pull/1484/head
Grzegorz Burzyński 2023-10-11 14:54:23 +02:00 committed by Olivier Mengué
parent 4ed68e1bca
commit 89920137cd
1 changed files with 3 additions and 1 deletions

View File

@ -1930,8 +1930,10 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time
tick = nil
go func() {
collect := new(CollectT)
defer func() {
ch <- collect.errors
}()
condition(collect)
ch <- collect.errors
}()
case errs := <-ch:
if len(errs) == 0 {