You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a condition function is passed to Never which does not return once before waitFor elapses, then the assertion passes having never completed a single check.
Never asserts that the given condition doesn't satisfy in waitFor time...
Technically this is correct, but I think our implementation of it is surprising.
Step To Reproduce
funcTestIfy(t*testing.T) {
assert.Never(t, func() bool {
time.Sleep(2*time.Second)
returntrue// this should fail
}, time.Millisecond, time.Second)
}
Expected behavior
The test fails because the condition is statically true
Actual behavior
Test passes
The text was updated successfully, but these errors were encountered:
I'm curious what @dolmen and @cszczepaniak think about this as you were discussing in this area over the summer. I think we should make Never, Eventually and EventuallyWithT wait for the last run of their condition functions to return, it would make their behaviour consistent when they are called with unreasonably small times.
Description
If a condition function is passed to
Never
which does not return once beforewaitFor
elapses, then the assertion passes having never completed a single check.Technically this is correct, but I think our implementation of it is surprising.
Step To Reproduce
Expected behavior
The test fails because the condition is statically true
Actual behavior
Test passes
The text was updated successfully, but these errors were encountered: