From 25760dc329be7193a48353ba523a3ef26b27d4ee Mon Sep 17 00:00:00 2001 From: wlandau Date: Tue, 28 May 2024 08:40:33 -0400 Subject: [PATCH] clarify test --- tests/local/test-backlog_crash.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/local/test-backlog_crash.R b/tests/local/test-backlog_crash.R index 118626e4..d5ddb5d6 100644 --- a/tests/local/test-backlog_crash.R +++ b/tests/local/test-backlog_crash.R @@ -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( @@ -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"))) })