Skip to content

Commit f224600

Browse files
Troubleshooting test coverage error
1 parent 681dc36 commit f224600

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/cluster-missing-future-pkg.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,27 @@ if (isWin32) types <- NULL
1414
if (supportsMulticore() && !on_solaris) types <- c(types, "FORK")
1515

1616
setupClusterWithoutPkgs <- function(type = "PSOCK", withouts = c("future")) {
17+
message("setupClusterWithoutPkgs() ...")
1718
cl <- parallel::makeCluster(1L, type = type, timeout = 60)
18-
19+
print(cl)
20+
1921
## Emulate a worker that does not have 'future' installed.
2022
## by setting a different user library path on the worker.
2123
libs <- parallel::clusterEvalQ(cl, .libPaths(tempdir()))[[1]]
24+
print(libs)
2225

2326
## Check whether 'future' is still available on the worker or not.
2427
## It could be that it is installed in the system library path, which
2528
## in case we cannot "hide" the future package from the worker.
2629
has_pkgs <- parallel::clusterCall(cl, fun = sapply, X = withouts,
2730
FUN = requireNamespace)[[1]]
31+
print(has_pkgs)
2832

2933
attr(cl, "libs") <- libs
3034
attr(cl, "has_pkgs") <- has_pkgs
3135

36+
message("setupClusterWithoutPkgs() ... done")
37+
3238
cl
3339
}
3440

0 commit comments

Comments
 (0)