diff --git a/DESCRIPTION b/DESCRIPTION index f0998e8a..f039e9ad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: future -Version: 1.33.2-9005 +Version: 1.33.2-9006 Title: Unified Parallel and Distributed Processing in R for Everyone Imports: digest, diff --git a/tests/Future-class.R b/tests/Future-class.R index b58bbf76..7911ee7f 100644 --- a/tests/Future-class.R +++ b/tests/Future-class.R @@ -25,11 +25,11 @@ stopifnot(is.call(expr)) clazzes <- list( sequential = SequentialFuture, - multisession = function(...) MultisessionFuture(..., workers = 2L), + multisession = function(...) MultisessionFuture(..., workers = I(1L)), sequential = SequentialFuture ) if (supportsMulticore()) { - clazzes$multicore = function(...) MulticoreFuture(..., workers = 2L) + clazzes$multicore = function(...) MulticoreFuture(..., workers = I(1L)) } for (clazz in clazzes) { @@ -48,6 +48,9 @@ for (clazz in clazzes) { v <- value(f) print(v) stopifnot(v == 42L) + + ## To avoid 'multisession' from leaving stray workers behind + ClusterRegistry(action = "stop") } message("*** Future class - exception ... DONE") diff --git a/tests/globals,NSE.R b/tests/globals,NSE.R index cc9546fc..ad60d6a9 100644 --- a/tests/globals,NSE.R +++ b/tests/globals,NSE.R @@ -40,6 +40,10 @@ for (strategy in supportedStrategies()) { } %lazy% TRUE stopifnot(identical(v3, v0)) + ## Make sure to shut down nested parallel workers + void %<-% { plan(sequential) } + print(void) + message(sprintf("- Strategy: %s ... DONE", strategy)) }