Skip to content

wait_for_value()'s ignore logic uses overly strict identical() for comparison #368

@cpsievert

Description

@cpsievert

In this line, wait_for_value() is using identical() to compare the ignore parameter with the result of $get_value()

is_invalid <- vapply(ignore, identical, logical(1), x = value)

This can lead to a situation where wait_for_value() doesn't actually wait if ignore = 1 and value = 1L (i.e., value is an integer but ignore isn't).

It seems better if the comparison was less strict, perhaps using all.equal() (similar to the difference between expect_identical() and expect_equal())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions