Nothing
test_that(".goose_cli_run retries once on timeout error", {
calls <- 0
old <- getOption("goose.internal_process_run")
on.exit(options(goose.internal_process_run = old), add = TRUE)
options(goose.internal_process_run = function(command, args, timeout) {
calls <<- calls + 1
if (calls == 1) stop("timeout")
list(status = 0L, stdout = "ok", stderr = "")
})
res <- gooseR:::`.goose_cli_run`(args = c("--version"), timeout = 1, retries = 1, quiet = TRUE)
expect_equal(res$status, 0L)
expect_equal(calls, 2)
})
test_that(".goose_cli_run does not retry when retries=0", {
calls <- 0
old <- getOption("goose.internal_process_run")
on.exit(options(goose.internal_process_run = old), add = TRUE)
options(goose.internal_process_run = function(command, args, timeout) {
calls <<- calls + 1
stop("timeout")
})
res <- gooseR:::`.goose_cli_run`(args = c("--version"), timeout = 1, retries = 0, quiet = TRUE)
expect_equal(res$status, 1L)
expect_equal(calls, 1)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.