Skip to content

Commit

Permalink
covr test
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Jan 27, 2025
1 parent a629373 commit e34016f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/crew_controller_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ crew_controller_local <- function(
crashes_error = NULL,
launch_max = NULL,
r_arguments = c("--no-save", "--no-restore"),
options_metrics = crew::crew_options_metrics(),
options_local = crew::crew_options_local(),
crashes_max = 5L,
backup = NULL,
options_metrics = crew::crew_options_metrics(),
options_local = crew::crew_options_local(),
local_log_directory = NULL,
local_log_join = NULL
) {
Expand Down
13 changes: 12 additions & 1 deletion tests/testthat/test-crew_controller.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,18 @@ crew_test("can relay task errors as local errors", {
x$start()
x$push(command = stop("this is an error"), name = "warnings_and_errors")
x$wait(seconds_timeout = 5)
expect_crew_error(x$pop(scale = FALSE, error = "stop"))
expect_silent(
if_any(
isTRUE(as.logical(Sys.getenv("R_COVR", "false"))),
suppressWarnings(
try(
x$pop(scale = FALSE, error = "stop"),
silent = TRUE
)
),
expect_crew_error(x$pop(scale = FALSE, error = "stop"))
)
)
})

crew_test("can relay task errors as local warnings", {
Expand Down

0 comments on commit e34016f

Please sign in to comment.