diff --git a/tests/hpc/test-crew_local.R b/tests/hpc/test-crew_local.R index cd210471..15323e09 100644 --- a/tests/hpc/test-crew_local.R +++ b/tests/hpc/test-crew_local.R @@ -120,7 +120,7 @@ tar_test("heavily parallel workload should run fast", { expect_equal(tar_outdated(callr_function = NULL), character(0)) }) -tar_test("saturated controllers should not get tasks", { +tar_test("saturated controllers should get tasks", { # Also watch CPU usage on htop. Should be low. skip_on_cran() skip_if_not_installed("crew") @@ -135,27 +135,6 @@ tar_test("saturated controllers should not get tasks", { tar_target(z, Sys.sleep(10)) ) }) - tar_make() # First two should start, then a pause, then the next two. - expect_equal(tar_outdated(callr_function = NULL), character(0)) -}) - -tar_test("controllers are assessed individually for saturation in a group", { - skip_on_cran() - skip_if_not_installed("crew") - tar_script({ - library(targets) - a <- crew::crew_controller_local(name = "a", workers = 2) - b <- crew::crew_controller_local(name = "b", workers = 2) - tar_option_set(controller = crew::crew_controller_group(a, b)) - resources_a <- tar_resources(crew = tar_resources_crew(controller = "a")) - resources_b <- tar_resources(crew = tar_resources_crew(controller = "b")) - list( - tar_target(w, Sys.sleep(5), resources = resources_a), - tar_target(x, Sys.sleep(5), resources = resources_a), - tar_target(y, Sys.sleep(5), resources = resources_b), - tar_target(z, Sys.sleep(5), resources = resources_b) - ) - }) - tar_make() # All 4 should start at once and finish at once. + tar_make() # All 4 targets should start and the last 2 should be "pending". expect_equal(tar_outdated(callr_function = NULL), character(0)) })