Skip to content

Commit 8992013

Browse files
czeslavodolmen
authored andcommitted
collect errors from condition in defer
1 parent 4ed68e1 commit 8992013

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assert/assertions.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1930,8 +1930,10 @@ func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time
19301930
tick = nil
19311931
go func() {
19321932
collect := new(CollectT)
1933+
defer func() {
1934+
ch <- collect.errors
1935+
}()
19331936
condition(collect)
1934-
ch <- collect.errors
19351937
}()
19361938
case errs := <-ch:
19371939
if len(errs) == 0 {

0 commit comments

Comments
 (0)