-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
assert.EventuallyAbout assert.Eventually/EventuallyWithTAbout assert.Eventually/EventuallyWithTbugpkg-assertChange related to package testify/assertChange related to package testify/assert
Description
assert.Eventually() returns false (and not Fail(...)) when the timer expires.
As a result, the test does not fail.
So for example, including assert.Eventually(t, func()bool{return false}, time.Second, time.Millisecond)) in your test does not cause it to fail. It will poll the function for a second, and then pass.
Is this intentional? It seems surprising, since the other assert functions cause the test to fail when the condition is not met.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
assert.EventuallyAbout assert.Eventually/EventuallyWithTAbout assert.Eventually/EventuallyWithTbugpkg-assertChange related to package testify/assertChange related to package testify/assert