mirror of https://github.com/stretchr/testify.git
collect errors from condition in defer
parent
4ed68e1bca
commit
89920137cd
|
@ -1930,9 +1930,11 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time
|
||||||
tick = nil
|
tick = nil
|
||||||
go func() {
|
go func() {
|
||||||
collect := new(CollectT)
|
collect := new(CollectT)
|
||||||
condition(collect)
|
defer func() {
|
||||||
ch <- collect.errors
|
ch <- collect.errors
|
||||||
}()
|
}()
|
||||||
|
condition(collect)
|
||||||
|
}()
|
||||||
case errs := <-ch:
|
case errs := <-ch:
|
||||||
if len(errs) == 0 {
|
if len(errs) == 0 {
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue