Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cpsievert opened this issue Nov 2, 2023 · 0 comments

Comments

@cpsievert
Copy link
Contributor

cpsievert commented Nov 2, 2023

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())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant