Running '000.sessionDetails.R' [1s]
  Running 'ClusterRegistry.R' [7s]
  Running 'Future-class.R' [2s]
  Running 'FutureError.R' [1s]
  Running 'FutureGlobals.R' [1s]
  Running 'FutureRegistry.R' [2s]
  Running 'as.cluster.R' [3s]
  Running 'availableCores.R' [1s]
  Running 'availableWorkers.R' [1s]
  Running 'backtrace.R' [4s]
  Running 'cluster.R' [14s]
  Running 'constant.R' [1s]
  Running 'demo.R' [4s]
  Running 'dotdotdot.R' [4s]
  Running 'early-signaling.R' [14s]
  Running 'fold.R' [7s]
  Running 'future,labels.R' [4s]
  Running 'future.R' [2s]
  Running 'futureAssign.R' [4s]
  Running 'futureAssign_OP.R' [5s]
  Running 'futureAssign_OP_with_environment.R' [1s]
  Running 'futureAssign_OP_with_listenv.R' [2s]
  Running 'futureCall.R' [5s]
  Running 'futureOf.R' [1s]
  Running 'futureOf_with_environment.R' [1s]
  Running 'futureOf_with_listenv.R' [2s]
  Running 'future_lapply,RNG.R' [52s]
  Running 'future_lapply,globals.R' [5s]
  Running 'future_lapply.R' [7s]
  Running 'futures.R' [26s]
  Running 'globals,NSE.R' [4s]
  Running 'globals,formulas.R' [5s]
  Running 'globals,manual.R' [5s]
  Running 'globals,resolve.R' [3s]
  Running 'globals,subassignment.R' [5s]
  Running 'globals,toolarge.R' [3s]
  Running 'globals,tricky.R' [8s]
  Running 'globals,tricky_recursive.R' [4s]
  Running 'globalsOf,tweaks.R' [1s]
  Running 'invalid-owner.R' [3s]
  Running 'makeClusterPSOCK.R' [2s]
  Running 'mandelbrot.R' [1s]
  Running 'multicore.R' [2s]
  Running 'multiprocess.R' [4s]
  Running 'multisession.R' [16s]
  Running 'nbrOfWorkers.R' [11s]
  Running 'nested_futures,mc.cores.R' [18s]
  Running 'nested_futures.R' [7s]
  Running 'non-exportable,connections.R' [3s]
  Running 'objectSize.R' [1s]
  Running 'plan.R' [20s]
  Running 'remote.R' [3s]
  Running 'requestCore.R' [3s]
  Running 'requestNode.R' [4s]
  Running 'resolve.R' [34s]
  Running 'rng.R' [9s]
  Running 'sequential.R' [1s]
  Running 'sessionDetails.R' [1s]
  Running 'startup.R' [5s]
  Running 'transparent.R' [1s]
  Running 'tweak.R' [2s]
  Running 'utils.R' [130s]
  Running 'uuid.R' [1s]
  Running 'whichIndex.R' [1s]
Running the tests in 'tests/utils.R' failed.
Complete output:
  > source("incl/start,load-only.R")
  R process uuid: e242f86e-1d13-f204-70a1-f8085d757567
  Setting plan('default')
  plan(): nbrOfWorkers() = 1
  plan(): nbrOfWorkers() = 1
  > 
  > message("*** utils ...")
  *** utils ...
  > 
  > message("*** hpaste() ...")
  *** hpaste() ...
  > 
  > # Some vectors
  > x <- 1:6
  > y <- 10:1
  > z <- LETTERS[x]
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Abbreviation of output vector
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > printf("x = %s.\n", hpaste(x))
  x = 1, 2, 3, 4, 5, 6.
  > ## x = 1, 2, 3, ..., 6.
  > 
  > printf("x = %s.\n", hpaste(x, maxHead = 2))
  x = 1, 2, ..., 6.
  > ## x = 1, 2, ..., 6.
  > 
  > printf("x = %s.\n", hpaste(x), maxHead = 3) # Default
  x = 1, 2, 3, 4, 5, 6.
  > ## x = 1, 2, 3, ..., 6.
  > 
  > # It will never output 1, 2, 3, 4, ..., 6
  > printf("x = %s.\n", hpaste(x, maxHead = 4))
  x = 1, 2, 3, 4, 5, 6.
  > ## x = 1, 2, 3, 4, 5 and 6.
  > 
  > # Showing the tail
  > printf("x = %s.\n", hpaste(x, maxHead = 1, maxTail = 2))
  x = 1, ..., 5, 6.
  > ## x = 1, ..., 5, 6.
  > 
  > # Turning off abbreviation
  > printf("y = %s.\n", hpaste(y, maxHead = Inf))
  y = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1.
  > ## y = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
  > 
  > ## ...or simply
  > printf("y = %s.\n", paste(y, collapse = ", "))
  y = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1.
  > ## y = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
  > 
  > # Change last separator
  > printf("x = %s.\n", hpaste(x, lastCollapse = " and "))
  x = 1, 2, 3, 4, 5 and 6.
  > ## x = 1, 2, 3, 4, 5 and 6.
  > 
  > # No collapse
  > stopifnot(all(hpaste(x, collapse = NULL) == x))
  > 
  > # Empty input
  > stopifnot(identical(hpaste(character(0)), character(0)))
  > 
  > message("*** hpaste() ...")
  *** hpaste() ...
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # asIEC()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** asIEC() ...")
  *** asIEC() ...
  > 
  > for (size in c(0, 10 ^ (0:20))) {
  +   cat(sprintf("Size: %.f bytes = %s\n", size, asIEC(size)))
  + }
  Size: 0 bytes = 0 bytes
  Size: 1 bytes = 1 bytes
  Size: 10 bytes = 10 bytes
  Size: 100 bytes = 100 bytes
  Size: 1000 bytes = 0.98 KiB
  Size: 10000 bytes = 9.77 KiB
  Size: 100000 bytes = 97.66 KiB
  Size: 1000000 bytes = 976.56 KiB
  Size: 10000000 bytes = 9.54 MiB
  Size: 100000000 bytes = 95.37 MiB
  Size: 1000000000 bytes = 953.67 MiB
  Size: 10000000000 bytes = 9.31 GiB
  Size: 100000000000 bytes = 93.13 GiB
  Size: 1000000000000 bytes = 931.32 GiB
  Size: 10000000000000 bytes = 9.09 TiB
  Size: 100000000000000 bytes = 90.95 TiB
  Size: 1000000000000000 bytes = 909.49 TiB
  Size: 10000000000000000 bytes = 8.88 PiB
  Size: 100000000000000000 bytes = 88.82 PiB
  Size: 1000000000000000000 bytes = 888.18 PiB
  Size: 10000000000000000000 bytes = 8.67 EiB
  Size: 100000000000000000000 bytes = 86.74 EiB
  > 
  > message("*** asIEC() ... DONE")
  *** asIEC() ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # .length()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** .length() ...")
  *** .length() ...
  > .length <- future:::.length
  > 
  > objs <- list(
  +   a = 1:3,
  +   b = as.list(1:3),
  +   c = structure(as.list(1:3), class = c("foo", "list")),
  +   d = data.frame(a = 1:3),
  +   e = as.environment(list(a = 1:3))
  + )
  > truth <- c(a = 3L, b = 3L, c = 3L, d = 1L, e = 1L)
  > 
  > ## Special case: length(x) == 5, but .length(x) == 2
  > ## BUG FIX: https://github.com/HenrikBengtsson/future/issues/164
  > if (requireNamespace("tools")) {
  +   objs[["f"]] <- structure(list("foo", length = 5L), class = "pdf_doc")
  +   truth["f"] <- 2L
  + }
  Loading required namespace: tools
  > 
  > for (name in names(objs)) {
  +   obj <- objs[[name]]
  +   len <- length(obj)
  +   .len <- .length(obj)
  +   cat(sprintf("%s: length = %d, .length = %d, expected = %d\n",
  +               name, len, .len, truth[name]))
  +   stopifnot(.len == truth[name])
  + }
  a: length = 3, .length = 3, expected = 3
  b: length = 3, .length = 3, expected = 3
  c: length = 3, .length = 3, expected = 3
  d: length = 1, .length = 1, expected = 1
  e: length = 1, .length = 1, expected = 1
  f: length = 5, .length = 2, expected = 2
  > 
  > message("*** .length() ... DONE")
  *** .length() ... DONE
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # debug()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** mdebug() ...")
  *** mdebug() ...
  > 
  > mdebug("Hello #1")
  Hello #1
  > options(future.debug = TRUE)
  > mdebug("Hello #2")
  Hello #2
  > options(future.debug = FALSE)
  > mdebug("Hello #3")
  NULL
  > 
  > message("*** mdebug() ... DONE")
  *** mdebug() ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # geval() et al.
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** geval() et al. ...")
  *** geval() et al. ...
  > 
  > gls <- function(..., envir = .GlobalEnv) ls(..., envir = envir)
  > 
  > message("- gls() ...")
  - gls() ...
  > genv <- new.env(parent = globalenv())
  > vars <- gls(envir = genv)
  > print(vars)
  character(0)
  > stopifnot(length(vars) == 0)
  > 
  > message("- gassign() ...")
  - gassign() ...
  > gassign("a", 1, envir = genv)
  NULL
  > vars <- gls(envir = genv)
  > print(vars)
  [1] "a"
  > stopifnot(length(vars) == 1)
  > 
  > message("- grmall() ...")
  - grmall() ...
  > grmall(envir = genv)
  > vars <- gls(envir = genv)
  > print(vars)
  character(0)
  > stopifnot(length(vars) == 0)
  > 
  > message("- geval() ...")
  - geval() ...
  > gassign("a", 1, envir = genv)
  NULL
  > res <- geval(substitute(a), envir = genv)
  > print(res)
  [1] 1
  > vars <- gls(envir = genv)
  > print(vars)
  [1] "a"
  > stopifnot(length(vars) == 1)
  > 
  > 
  > message("*** geval() et al. ... DONE")
  *** geval() et al. ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # requirePackages()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** requirePackages() ...")
  *** requirePackages() ...
  > 
  > res <- requirePackages("future")
  Loading required package: future
  > res <- requirePackages(c("future", "listenv"))
  Loading required package: listenv
  > 
  > res <- try(requirePackages("<unknown package>"), silent = TRUE)
  Loading required package: <unknown package>
  Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
    there is no package called '<unknown package>'
  > stopifnot(inherits(res, "try-error"))
  > 
  > message("*** requirePackages() ... DONE")
  *** requirePackages() ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # importParallel()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** importParallel() ...")
  *** importParallel() ...
  > 
  > mclapply <- importParallel("mclapply")
  > stopifnot(identical(mclapply, parallel::mclapply))
  > 
  > ns <- getNamespace("parallel")
  > if (exists("sendCall", envir = ns, mode = "function")) {
  +   sendCall <- importParallel("sendCall")
  +   stopifnot(identical(sendCall, parallel:::sendCall))
  + } else {
  +   res <- try(importParallel("sendCall"), silent = TRUE)
  +   stopifnot(inherits(res, "try-error"))
  + }
  > 
  > res <- try(importParallel("<unknown function>"), silent = TRUE)
  > stopifnot(inherits(res, "try-error"))
  > 
  > message("*** importParallel() ... DONE")
  *** importParallel() ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # Random seeds
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** Random seeds ...")
  *** Random seeds ...
  > 
  > set_random_seed(seed = NULL)
  > seed <- get_random_seed()
  > stopifnot(is.null(seed))
  > 
  > set_random_seed(seed = 42L)
  > seed <- get_random_seed()
  > stopifnot(identical(seed, 42L))
  > 
  > res <- tryCatch({
  +   seed <- as_lecyer_cmrg_seed(seed = FALSE)
  + }, error = identity)
  > print(res)
  <simpleError in as_lecyer_cmrg_seed(seed = FALSE): Argument 'seed' must be TRUE if logical: FALSE>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > seed <- as_lecyer_cmrg_seed(seed = 42L)
  Warning in RNGkind("L'Ecuyer-CMRG") :
    '.Random.seed[1]' is not a valid RNG kind so ignored
  > str(seed)
   int [1:7] 407 -2133391687 507561766 1260545903 1362917092 -1772566379 -1344458670
  > set_random_seed(seed = seed)
  > stopifnot(identical(get_random_seed(), seed))
  > 
  > seed2 <- as_lecyer_cmrg_seed(seed = TRUE)
  > str(seed2)
   int [1:7] 407 -2133391687 507561766 1260545903 1362917092 -1772566379 -1344458670
  > stopifnot(identical(seed2, seed))
  > 
  > seed3 <- as_lecyer_cmrg_seed(seed = seed)
  > str(seed3)
   int [1:7] 407 -2133391687 507561766 1260545903 1362917092 -1772566379 -1344458670
  > stopifnot(identical(seed3, seed))
  > 
  > ## Invalid L'Ecuyer seed
  > seed_invalid <- seed + 1L
  > res <- tryCatch({
  +   seed <- as_lecyer_cmrg_seed(seed = seed_invalid)
  + }, error = identity)
  > print(res)
  <simpleError in as_lecyer_cmrg_seed(seed = seed_invalid): Argument 'seed' must be L'Ecuyer-CMRG RNG seed as returned by parallel::nextRNGStream() or an single integer:  int [1:7] 408 -2133391686 507561767 1260545904 1362917093 -1772566378 -1344458669>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > ## Invalid seed
  > res <- tryCatch({
  +   seed <- as_lecyer_cmrg_seed(seed = 1:2)
  + }, error = identity)
  > print(res)
  <simpleError in as_lecyer_cmrg_seed(seed = 1:2): Argument 'seed' must be of length 1 or 7 (= 1+6): int [1:2] 1 2>
  > stopifnot(inherits(res, "simpleError"))
  > 
  > message("*** Random seeds ... DONE")
  *** Random seeds ... DONE
  > 
  > 
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > # myInternalIP() and myExternalIP()
  > # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  > message("*** myInternalIP() ...")
  *** myInternalIP() ...
  > ips <- myInternalIP(mustWork = FALSE)
  > message("myInternalIP(): ", paste(ips, collapse = ", "))
  myInternalIP(): NA
  > message("*** myInternalIP() ... DONE")
  *** myInternalIP() ... DONE
  > 
  > ips <- myInternalIP(force = TRUE, which = "first", mustWork = FALSE)
  > message("myInternalIP(which = 'first'): ", paste(ips, collapse = ", "))
  myInternalIP(which = 'first'): NA
  > message("*** myInternalIP() ... DONE")
  *** myInternalIP() ... DONE
  > 
  > ips <- myInternalIP(force = TRUE, which = "last", mustWork = FALSE)
  > message("myInternalIP(which = 'last'): ", paste(ips, collapse = ", "))
  myInternalIP(which = 'last'): NA
  > message("*** myInternalIP() ... DONE")
  *** myInternalIP() ... DONE
  > 
  > ips <- myInternalIP(force = TRUE, which = "all", mustWork = FALSE)
  > message("myInternalIP(which = 'all'): ", paste(ips, collapse = ", "))
  myInternalIP(which = 'all'): NA
  > message("*** myInternalIP() ... DONE")
  *** myInternalIP() ... DONE
  > 
  > message("*** myExternalIP() ...")
  *** myExternalIP() ...
  > ip <- myExternalIP(mustWork = FALSE)
  Warning in file(con, "r") :
    InternetOpenUrl failed: 'Die Serververbindung konnte nicht hergestellt werden.'
  Warning in file(con, "r") :
    cannot open URL 'https://myexternalip.com/raw': HTTP status was '403 Forbidden'
  Warning in readLines(url) :
    incomplete final line found on 'https://diagnostic.opendns.com/myip'
  Warning in readLines(url) :
    incomplete final line found on 'https://api.ipify.org/'
  Warning in file(con, "r") :
    InternetOpenUrl failed: 'Die Serververbindung konnte nicht hergestellt werden.'
  Warning in file(con, "r") :
    cannot open URL 'http://myexternalip.com/raw': HTTP status was '403 Forbidden'
  Warning in readLines(url) :
    incomplete final line found on 'http://diagnostic.opendns.com/myip'
  Warning in readLines(url) :
    incomplete final line found on 'http://api.ipify.org/'
  Error in myExternalIP(mustWork = FALSE) : length(value) == 1 is not TRUE
  Calls: myExternalIP -> stopifnot
  Execution halted