From b6c8ad8d4b00d9b8cea009b335d9b64409439673 Mon Sep 17 00:00:00 2001 From: wlandau-lilly Date: Wed, 11 Oct 2023 08:50:42 -0400 Subject: [PATCH] Set seed = FALSE in future::future() --- NEWS.md | 1 + R/class_future.R | 2 +- tests/testthat/test-class_clustermq.R | 2 ++ tests/testthat/test-tar_make_clustermq.R | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 6d7f82c16..1d0e353c4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ * Add new arguments `meta`, `progress`, `process`, and `crew` to control individual metadata files in `tar_meta_upload()`, `tar_meta_download()`, `tar_meta_sync()`, and `tar_meta_delete()`. * Avoid newly deprecated arguments and functions in `crew` 0.5.0.9003 (https://github.com/wlnadau/crew/issues/131). * Allow `tar_read()` etc. inside a pipeline whenever it uses a different data store (#1158, @MilesMcBain). +* Set `seed = FALSE` in `future::future()` (#1166, @svraka). # targets 1.3.0 diff --git a/R/class_future.R b/R/class_future.R index 92bbedcea..ba427c456 100644 --- a/R/class_future.R +++ b/R/class_future.R @@ -137,7 +137,7 @@ future_class <- R6::R6Class( label = target_get_name(target), resources = resources, lazy = FALSE, - seed = 0L + seed = FALSE ) future <- do.call(what = future::future, args = args) memory_set_object( diff --git a/tests/testthat/test-class_clustermq.R b/tests/testthat/test-class_clustermq.R index 00a20643b..c5d14069e 100644 --- a/tests/testthat/test-class_clustermq.R +++ b/tests/testthat/test-class_clustermq.R @@ -1,4 +1,5 @@ tar_test("clustermq$workers", { + skip_cran() out <- clustermq_init(list(), workers = 3L) expect_equal(out$workers, 3L) }) @@ -269,6 +270,7 @@ tar_test("cover the worker shutdown step in clustermq$iterate() event loop", { }) tar_test("clustermq$validate()", { + skip_cran() out <- clustermq_init(pipeline_init()) expect_silent(out$validate()) }) diff --git a/tests/testthat/test-tar_make_clustermq.R b/tests/testthat/test-tar_make_clustermq.R index 3a030a6cf..9da7e2e9d 100644 --- a/tests/testthat/test-tar_make_clustermq.R +++ b/tests/testthat/test-tar_make_clustermq.R @@ -1,6 +1,7 @@ crew_test_sleep() tar_test("tar_make_clustermq() works with callr_function = NULL", { + skip_cran() skip_on_os("windows") skip_on_os("solaris") require_clustermq()