tests/testthat/test-wait.R

test_that("wait_until works", {
    x <- 0
    later::later(function() x <<- 1, 0.5)
    wait_until(x == 1, timeout = 5)
    expect_equal(x, 1)
})

Try the retry package in your browser

Any scripts or data that you put into this service are public.

retry documentation built on May 29, 2024, 9:32 a.m.