Skip to content

Commit

Permalink
clarify test
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed May 28, 2024
1 parent a94a449 commit 25760dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/local/test-backlog_crash.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ test_that("backlogged crashed workers relaunch", {
controller <- crew_controller_local(workers = 2L, seconds_idle = Inf)
on.exit(controller$terminate())
controller$start()
controller$push(TRUE)
controller$push(Sys.sleep(10))
controller$push(name = "task-sleep", command = Sys.sleep(10))
controller$push(name = "task-true", command = TRUE)
controller$scale(throttle = FALSE)
for (handle in controller$launcher$workers$handle) {
crew_retry(
Expand All @@ -24,4 +24,6 @@ test_that("backlogged crashed workers relaunch", {
)
}
expect_true(controller$wait(seconds_timeout = 20L))
tasks <- controller$collect()
expect_equal(sort(tasks$name), sort(c("task-sleep", "task-true")))
})

0 comments on commit 25760dc

Please sign in to comment.