Running ‘testthat.R’ [18s/280s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(multiverse)
  Loading required package: knitr
  > 
  > test_check("multiverse")
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  
  Attaching package: 'tidyr'
  
  The following object is masked from 'package:multiverse':
  
      expand
  
  
   Error in FUN(X[[i]], ...) : error
   test_check -> test_dir -> test_files -> test_files_serial -> with_reporter -> lapply -> FUN -> source_file -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> test_that -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> expect_warning -> expect_condition_matching_ -> quasi_capture -> .capture -> withCallingHandlers -> eval_bare -> execute_multiverse -> execute_tree -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> stop -> FUN(X[[i]], ...) 
  
  
   Error in FUN(X[[i]], ...) : error
   test_check -> test_dir -> test_files -> test_files_serial -> with_reporter -> lapply -> FUN -> source_file -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> test_that -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> expect_warning -> expect_condition_matching_ -> quasi_capture -> .capture -> withCallingHandlers -> eval_bare -> execute_multiverse -> execute_tree -> mapply ->  -> app -> FUN -> tryStack -> lapply -> FUN -> FUN -> stop -> FUN(X[[i]], ...) 
  
  Fatal error: creating temporary file for '-e' failed
  Saving _problems/test-execute-429.R
  
  Attaching package: 'distributional'
  
  The following object is masked from 'package:multiverse':
  
      parameters
  
  
  Attaching package: 'purrr'
  
  The following objects are masked from 'package:rlang':
  
      flatten, flatten_chr, flatten_dbl, flatten_int, flatten_lgl,
      flatten_raw, invoke, splice
  
  
   Error in FUN(X[[i]], ...) : object 'dat' not found
   test_check -> test_dir -> test_files -> test_files_serial -> with_reporter -> lapply -> FUN -> source_file -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> test_that -> test_code -> withRestarts -> withOneRestart -> withCallingHandlers -> eval -> eval -> expect_warning -> expect_condition_matching_ -> quasi_capture -> .capture -> withCallingHandlers -> eval_bare -> myfun -> inside -> execute_universe -> lapply -> FUN -> tryStack -> lapply -> FUN -> FUN -> dat %>% mutate -> mutate -> FUN(X[[i]], ...) 
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 245 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-execute.R:429:3'): execute_universe outputs correct result during parallel execution of a partial multiverse ──
  Error in `(function (workers, makeNode = makeNodePSOCK, port = c("auto", "random"), user = NULL, ..., autoStop = FALSE, tries = getOption2("parallelly.makeNodePSOCK.tries", 3L), delay = getOption2("parallelly.makeNodePSOCK.tries.delay", 15), validate = getOption2("parallelly.makeNodePSOCK.validate", TRUE), verbose = isTRUE(getOption("parallelly.debug")))  {     if (verbose) {         verbose_prefix <- "[local output] "         oopts <- options(parallelly.debug = verbose)         mdebugf_push("%smakeClusterPSOCK() ...", verbose_prefix)         on.exit({             mdebugf_pop("%smakeClusterPSOCK() ... done", verbose_prefix)             options(oopts)         })     }     localhostHostname <- getOption2("parallelly.localhost.hostname", "localhost")     if (is.numeric(workers)) {         if (length(workers) != 1L) {             stopf("When numeric, argument 'workers' must be a single value: %s", length(workers))         }         workers <- structure(as.integer(workers), class = class(workers))         if (is.na(workers) || workers < 1L) {             stopf("Number of 'workers' must be one or greater: %s", workers)         }         checkNumberOfLocalWorkers(workers)         workers <- rep(localhostHostname, times = workers)     }     if (!is.null(user)) {         stop_if_not(is.character(user), length(user) == 1L || length(user) == length(workers))         user <- rep(user, length.out = length(workers))     }     tries <- as.integer(tries)     stop_if_not(length(tries) == 1L, is.integer(tries), !is.na(tries), tries >= 1L)     delay <- as.numeric(delay)     stop_if_not(length(delay) == 1L, is.numeric(delay), !is.na(delay), delay >= 0)     validate <- as.logical(validate)     stop_if_not(length(validate) == 1L, is.logical(validate), !is.na(validate))     if (identical(makeNode, makeNodePSOCK)) {         free <- freeConnections()         if (validate)              free <- free - 1L         if (length(workers) > free) {             msg <- sprintf("Cannot create %d parallel PSOCK nodes. Each node needs one connection, but there are only %d connections left out of the maximum %d available on this R installation", length(workers), free, availableConnections())             if (getRversion() >= "4.4.0") {                 msg <- sprintf("%s. To increase this limit in R (>= 4.4.0), use command-line option '--max-connections=N' when launching R", msg)             }             hint <- detectCoresHint(length(workers))             if (!is.null(hint))                  msg <- sprintf("%s. %s", msg, hint)             stopf(msg)         }     }     if (verbose) {         mdebugf("%sWorkers: [n = %d] %s", verbose_prefix, length(workers), hpaste(sQuote(workers)))     }     if (length(port) == 0L) {         stop("Argument 'port' must be of length one or more: 0")     }     port_org <- port     port <- freePort(port)     if (verbose)          mdebugf("%sBase port: %d", verbose_prefix, port)     if (is.na(port)) {         stop("Argument 'port' specifies non-available port(s): ", paste(port_org, collapse = ", "))     }     n <- length(workers)     nodeOptions <- vector("list", length = n)     if (verbose)          mdebugf("%sGetting setup options for %d cluster nodes ...", verbose_prefix, n)     for (ii in seq_len(n)) {         if (verbose)              mdebugf("%sNode #%d of %d ...", verbose_prefix, ii, n)         user_ii <- user[ii]         if (!is.null(user_ii) && user_ii == "*")              user_ii <- NULL         options <- makeNode(workers[[ii]], port = port, user = user_ii, ..., rank = ii, action = "options", verbose = verbose)         stop_if_not(inherits(options, "makeNodePSOCKOptions"))         nodeOptions[[ii]] <- options     }     if (verbose)          mdebugf("%sGetting setup options for %d cluster nodes ... done", verbose_prefix, n)     setup_strategy <- lapply(nodeOptions, FUN = function(options) {         value <- options$setup_strategy         if (is.null(value))              value <- "sequential"         stop_if_not(is.character(value), length(value) == 1L)         value     })     setup_strategy <- unlist(setup_strategy, use.names = FALSE)     is_parallel <- (setup_strategy == "parallel")     force_sequential <- FALSE     if (any(is_parallel)) {         if (verbose)              mdebugf("%sParallel setup requested for some PSOCK nodes", verbose_prefix)         if (!all(is_parallel)) {             if (verbose)                  mdebugf("%sParallel setup requested only for some PSOCK nodes; will revert to a sequential setup for all", verbose_prefix)             force_sequential <- TRUE         }         else {             affected <- affected_by_bug18119()             if (!is.na(affected) && affected) {                 if (verbose)                    mdebugf("%sParallel setup requested but not supported on this version of R: %s", verbose_prefix, getRversion())                 force_sequential <- TRUE             }         }     }     if (force_sequential) {         setup_strategy <- "sequential"         for (ii in which(is_parallel)) {             if (verbose)                  mdebugf("%sNode #%d of %d ...", verbose_prefix, ii, n)             user_ii <- user[ii]             if (!is.null(user_ii) && user_ii == "*")                  user_ii <- NULL             args <- list(workers[[ii]], port = port, user = user_ii, ..., rank = ii, action = "options", verbose = verbose)             args$setup_strategy <- "sequential"             options <- do.call(makeNode, args = args)             stop_if_not(inherits(options, "makeNodePSOCKOptions"))             nodeOptions[[ii]] <- options         }     }     stopifnot(length(nodeOptions) == n)     setup_strategy <- lapply(nodeOptions, FUN = function(options) {         value <- options$setup_strategy         if (is.null(value))              value <- "sequential"         stop_if_not(is.character(value), length(value) == 1L)         value     })     stopifnot(length(setup_strategy) == n)     setup_strategy <- unlist(setup_strategy, use.names = FALSE)     setup_strategy <- unique(setup_strategy)     stop_if_not(length(setup_strategy) == 1L)     cl <- vector("list", length = length(nodeOptions))     class(cl) <- c("RichSOCKcluster", "SOCKcluster", "cluster")     stopifnot(length(cl) == length(nodeOptions))     on.exit({         nodes <- vapply(cl, FUN = inherits, c("SOCKnode", "SOCK0node"), FUN.VALUE = FALSE)         stopCluster(cl[nodes])         cl <- NULL     }, add = TRUE)     if (setup_strategy == "parallel") {         if (getRversion() < "4.0.0") {             stopf("Parallel setup of PSOCK cluster nodes is not supported in R %s", getRversion())             socketAccept <- serverSocket <- function(...) NULL         }         sendCall <- importParallel("sendCall")         recvResult <- importParallel("recvResult")         options <- nodeOptions[[1]]         if (verbose) {             mdebugf("%sSetting up PSOCK nodes in parallel", verbose_prefix)             mstr(options)         }         port <- options[["port"]]         connectTimeout <- options[["connectTimeout"]]         timeout <- options[["timeout"]]         useXDR <- options[["useXDR"]]         nodeClass <- c("RichSOCKnode", if (useXDR) "SOCKnode" else "SOCK0node")         cmd <- options[["cmd"]]         if (verbose) {             mdebugf("%sSystem call to launch all workers:", verbose_prefix)             mdebugf("%s%s", verbose_prefix, cmd)         }         if (verbose)              mdebugf("%sStarting PSOCK main server", verbose_prefix)         socket <- serverSocket(port = port)         on.exit(if (!is.null(socket)) close(socket), add = TRUE)         assert_system_is_supported()         if (.Platform[["OS.type"]] == "windows") {             for (ii in seq_along(cl)) {                 system(cmd, wait = FALSE, input = "")             }         }         else {             cmd <- paste(rep(cmd, times = length(cl)), collapse = " & ")             system(cmd, wait = FALSE)         }         if (verbose)              mdebugf("%sWorkers launched", verbose_prefix)         ready <- 0L         pending <- list()         on.exit({             lapply(pending, FUN = function(x) close(x$con))             cl <- NULL         }, add = TRUE)         if (verbose)              mdebugf_push("%sWaiting for workers to connect back ...", verbose_prefix)         t0 <- Sys.time()         while (ready < length(cl)) {             if (verbose)                  mdebugf("%s%d workers out of %d ready", verbose_prefix, ready, length(cl))             cons <- lapply(pending, FUN = function(x) x$con)             if (difftime(Sys.time(), t0, units = "secs") > connectTimeout + 5) {                 failed <- length(cl) - ready                 stop(sprintf(ngettext(failed, "Cluster setup failed (connectTimeout=%.1f seconds). %d worker of %d failed to connect.", "Cluster setup failed (connectTimeout=%.1f seconds). %d of %d workers failed to connect."), connectTimeout + 5, failed, length(cl)))             }             a <- socketSelect(append(list(socket), cons), write = FALSE, timeout = connectTimeout)             canAccept <- a[1]             canReceive <- seq_along(pending)[a[-1]]             if (canAccept) {                 attr(localhostHostname, "localhost") <- TRUE                 con <- socketAccept(socket = socket, blocking = TRUE, open = "a+b", timeout = timeout)                 options$rank <- ready                 options$pidfile <- NULL                 scon <- structure(list(con = con, host = localhostHostname, rank = ready), options = options, calls = sys.calls(), class = nodeClass)                 res <- tryCatch({                   sendCall(scon, eval, list(quote(Sys.getpid())))                 }, error = identity)                 pending <- append(pending, list(scon))             }             for (scon in pending[canReceive]) {                 pid <- tryCatch({                   recvResult(scon)                 }, error = identity)                 if (is.integer(pid)) {                   ready <- ready + 1L                   cl[[ready]] <- scon                 }                 else {                   close(scon$con)                 }             }             if (length(canReceive) > 0L)                  pending <- pending[-canReceive]         }         if (verbose) {             mdebugf("%s%d workers out of %d ready", verbose_prefix, ready, length(cl))             mdebugf_pop("%sWaiting for workers to connect back ... done", verbose_prefix)         }     }     else if (setup_strategy == "sequential") {         retryPort <- getOption2("parallelly.makeNodePSOCK.tries.port", "same")         for (ii in seq_along(cl)) {             if (verbose) {                 mdebugf_push("%sCreating node #%d of %d ...", verbose_prefix, ii, n)                 mdebugf("%ssetting up node", verbose_prefix)             }             options <- nodeOptions[[ii]]             for (kk in 1:tries) {                 if (verbose) {                   mdebugf("%sattempt #%d of %d", verbose_prefix, kk, tries)                 }                 node <- tryCatch({                   makeNode(options, verbose = verbose)                 }, error = identity)                 if (!inherits(node, "PSOCKConnectionError"))                    break                 if (kk < tries) {                   if (verbose)                      mdebug(conditionMessage(node))                   if (retryPort == "next") {                     options$port <- min(options$port + 1L, 65535L)                   }                   else if (retryPort == "available") {                     options$port <- freePort()                   }                   if (verbose) {                     mdebugf("%swaiting %g seconds before trying again", verbose_prefix, delay)                   }                   Sys.sleep(delay)                 }             }             if (inherits(node, "error")) {                 ex <- node                 if (inherits(node, "PSOCKConnectionError")) {                   if (verbose) {                     mdebugf("%sFailed %d attempts with %g seconds delay", verbose_prefix, tries, delay)                   }                   ex$message <- sprintf("%s\n * Number of attempts: %d (%gs delay)", conditionMessage(ex), tries, delay)                 }                 else {                   ex$call <- sys.call()                 }                 stop(ex)             }             if (!is.null(node))                  cl[[ii]] <- node             stopifnot(length(cl) == n)             if (verbose) {                 mdebugf_pop("%sCreating node #%d of %d ... done", verbose_prefix, ii, n)             }         }     }     if (verbose) {         mdebugf("%sLaunching of %d workers completed", verbose_prefix, n)         mdebugf("%sNumber of nodes in cluster: %d", verbose_prefix, length(cl))     }     try(close(socket), silent = TRUE)     socket <- NULL     stopifnot(length(cl) == n)     if (validate) {         if (verbose) {             mdebugf_push("%sCollecting session information from %d workers", verbose_prefix, length(cl))         }         for (ii in seq_along(cl)) {             cl[ii] <- add_cluster_session_info(cl[ii])             if (verbose)                  mdebugf("%sWorker #%d of %d", verbose_prefix, ii, length(cl))         }         stopifnot(length(cl) == n)         if (verbose) {             mdebugf_pop("%sCollecting session information from %d workers", verbose_prefix, length(cl))         }     }     if (autoStop) {         cl <- autoStopCluster(cl)         stopifnot(length(cl) == n)         if (verbose)              mdebugf("%sAdded automatic stop of cluster on garbage collection", verbose_prefix)     }     stopifnot(length(cl) == n)     on.exit()     if (verbose) {         mdebugf_pop("%smakeClusterPSOCK() ... done", verbose_prefix)         options(oopts)     }     cl })(base::quote(3L), rscript_libs = base::quote(c("/tmp/Rtmp6R8jjP/RLIBS_1bed09c649732", "/home/hornik/tmp/R.check/r-devel-gcc/Work/build/library")))`: Cluster setup failed (connectTimeout=125.0 seconds). 1 worker of 3 failed to connect.
  Backtrace:
       ▆
    1. ├─future::plan(multisession, workers = 3) at test-execute.R:429:3
    2. │ └─future (local) plan_set(...)
    3. │   └─future:::plan_init(stack[[1]], debug = debug)
    4. │     └─future:::makeFutureBackend(evaluator, debug = debug)
    5. │       └─base::do.call(factory, args = args, envir = envir)
    6. └─future (local) `<fn>`(workers = 3)
    7.   └─future::ClusterFutureBackend(...)
    8.     └─clusterRegistry$startCluster(...)
    9.       └─future (local) makeCluster(workers, ...)
   10.         ├─base::do.call(makeClusterPSOCK, args = args, quote = TRUE)
   11.         └─parallelly (local) `<fn>`(base::quote(3L), rscript_libs = base::quote(`<chr>`))
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 245 ]
  Error:
  ! Test failures.
  Execution halted