test_that("async_retryable", {
do <- async(function() {
i <- 1
f <- function() {
i <<- i + 1
if (i < 5) stop("error") else "OK"
}
async_retryable(f, 5)()
})
expect_identical(synchronise(do()), "OK")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.