* using log directory 'd:/Rcompile/CRANpkg/local/4.5/mirai.Rcheck' * using R Under development (unstable) (2024-05-25 r86622 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'mirai/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'mirai' version '1.0.0' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'mirai' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [0s] OK * checking whether the package can be loaded with stated dependencies ... [0s] OK * checking whether the package can be unloaded cleanly ... [0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s] OK * checking whether the namespace can be unloaded cleanly ... [0s] OK * checking loading without being on the library search path ... [0s] OK * checking whether startup messages can be suppressed ... [0s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [4s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [9s] ERROR Running 'tests.R' [9s] Running the tests in 'tests/tests.R' failed. Complete output: > library(mirai) > library(parallel) > > nanotest <- function(x) invisible(x || stop("is not TRUE when expected to be TRUE")) > nanotestn <- function(x) invisible(is.null(x) || stop("is not NULL when expected to be NULL")) > nanotestz <- function(x) invisible(x == 0L || stop("does not equal 0L as expected")) > nanotesto <- function(x) invisible(x == 1L || stop("does not equal 1L as expected")) > nanotesti <- function(a, b) invisible(identical(a, b) || stop("the arguments are not identical as expected")) > nanotestp <- function(x) invisible(is.character(capture.output(print(x))) || stop("print output of expression cannot be captured as a character value")) > nanotesterr <- function(x, e = "") invisible(grepl(e, tryCatch(x, error = identity)[["message"]], fixed = TRUE) || stop("expected error message '", e, "' not generated")) > connection <- !is_error_value(call_mirai(mirai(TRUE, .timeout = 2000L))[["data"]]) > > # core tests > nanotest(is.list(status())) > nanotestz(status()[["connections"]]) > nanotestz(status()[["daemons"]]) > nanotestz(daemons(0L)) > nanotesterr(daemons(url = "URL"), "Invalid argument") > nanotesterr(daemons(-1), "zero or greater") > nanotesterr(daemons(n = 0, url = "ws://localhost:0"), "1 or greater") > nanotesterr(daemons(raw(0L)), "must be numeric") > nanotesterr(daemons(n = 1, maxtasks = "100"), "'...' arguments") > nanotesterr(dispatcher(client = "URL"), "at least one") > nanotesterr(daemon("URL"), "Invalid argument") > nanotest(is.character(mlc <- launch_remote("ws://[::1]:5555"))) > nanotest(inherits(mlc, "miraiLaunchCmd")) > nanotestp(mlc) > nanotesterr(launch_remote("ws://[::1]:5555", remote = remote_config(command = "echo", args = "invalid")), "must be an element") > nanotesterr(launch_remote(c("tcp://localhost:5555", "tcp://localhost:6666", "tcp://localhost:7777"), remote = remote_config(command = "echo", args = list(c("test", "."), c("test", ".")))), "must be of length 1 or the same length") > nanotesterr(launch_local(1L), "requires daemons to be set") > nanotestn(everywhere(mirai::serialization())) > nanotest(is.list(serialization())) > nanotesterr(serialization(list(NULL)), "must be a list of 2 functions or NULL") > nanotest(is.character(host_url())) > nanotest(substr(host_url(ws = TRUE, tls = TRUE), 1L, 3L) == "wss") > nanotest(substr(host_url(tls = TRUE), 1L, 3L) == "tls") > nanotest(grepl("5555", host_url(port = 5555), fixed = TRUE)) > nanotest(is.list(ssh_config("ssh://remotehost"))) > nanotest(is.list(ssh_config("ssh://remotehost", tunnel = TRUE, host = "tls+tcp://127.0.0.1:5555"))) > nanotesterr(ssh_config("ssh://remotehost", tunnel = TRUE), "'host' must be specified") > nanotest(is_mirai_interrupt(r <- mirai:::mk_interrupt_error())) > nanotestp(r) > nanotest(is_mirai_error(r <- `class<-`("Error in: testing\n", c("miraiError", "errorValue", "try-error")))) > nanotestp(r) > nanotestn(r$stack.trace) > nanotest(mirai:::.DollarNames.miraiError(NULL, "s") == "stack.trace") > nanotest(mirai:::is.promising.mirai()) > nanotestn(nextstream()) > nanotestn(nextget("pid")) > Sys.sleep(2.5) > # mirai tests > if (connection) { + n <- function() m + m <- mirai({ + Sys.sleep(0.1) + q <- m + n() + 2L + q / m + }, m = 2L, .args = environment(), .timeout = 2000L) + nanotest(identical(call_mirai(m), m)) + nanotest(is_error_value(m$data) || m$data == 3L) + Sys.sleep(2.5) + `lang obj` <- quote(m + n + 2L) + args <- c(m = 2L, n = 4L) + m <- mirai(.expr = `lang obj`, .args = args, .timeout = 2000L) + nanotest(is_error_value(call_mirai_(m)$data) || m$data == 8L) + nanotestn(stop_mirai(m)) + Sys.sleep(2.5) + } > # daemons tests > if (connection) { + nanotesto(d <- daemons(1L, dispatcher = FALSE)) + nanotestp(d) + me <- mirai(mirai::mirai(), .timeout = 2000L) + nanotest(is_mirai_error(call_mirai(me)$data) || is_error_value(me$data)) + nanotest(!is_mirai_interrupt(me$data)) + nanotest(is_error_value(me[["data"]])) + nanotestp(me) + nanotestp(me$data) + df <- data.frame(a = 1, b = 2) + dm <- mirai(as.matrix(df), .args = list(df = df), .timeout = 2000L) + nanotest(is_mirai(call_mirai(dm))) + nanotest(!unresolved(dm)) + nanotest(is_error_value(dm$data) || is.matrix(dm$data)) + nanotest(is.integer(status()[["connections"]])) + nanotest(is.character(status()[["daemons"]])) + nanotestz(daemons(0L)) + Sys.sleep(1L) + nanotesto(daemons(1L, dispatcher = FALSE, idletime = 500L, timerstart = 1L, cleanup = FALSE, output = TRUE, seed = 1546, .compute = "new")) + nanotest(is.character(nextget("urls", .compute = "new"))) + nanotest(is.integer(nextstream(.compute = "new"))) + Sys.sleep(1.5) + nanotestn(everywhere({}, as.environment(df), .compute = "new")) + mn <- mirai("test1", .compute = "new") + mp <- mirai(b + 1, .compute = "new") + Sys.sleep(1L) + nanotest(unresolved(mn$data) || mn$data == "test1") + nanotest(unresolved(mp$data) || mp$data == 3) + Sys.sleep(1L) + nanotest(is.integer(status(.compute = "new")[["connections"]])) + nanotestz(daemons(0L, .compute = "new")) + Sys.sleep(1L) + nanotest(daemons(url = value <- local_url(), dispatcher = FALSE) == value) + nanotesti(status()$daemons, nextget("urls")) + nanotestz(daemons(0L)) + Sys.sleep(1L) + } * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [4s] OK * checking PDF version of manual ... [22s] OK * checking HTML version of manual ... [5s] OK * DONE Status: 1 ERROR