From 2d9f4fee33e83bd0bebaeaad8a9f5357a92b0b92 Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Mon, 4 Dec 2023 15:33:39 -0500 Subject: [PATCH] Fix #1182 --- tests/hpc/test-crew_local.R | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/tests/hpc/test-crew_local.R b/tests/hpc/test-crew_local.R index cd2104710..15323e096 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)) })