Skip to content

assert.Eventually() does not fail test when the timer expires #837

@ghost

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    assert.EventuallyAbout assert.Eventually/EventuallyWithTbugpkg-assertChange related to package testify/assert

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions