Running ‘testthat.R’ [40s/50s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CHNOSZ)
  CHNOSZ version 1.1.3 (2017-11-13)
  Please run data(thermo) to create the "thermo" object
  > 
  > # as fix for https://github.com/hadley/testthat/issues/129, https://github.com/hadley/testthat/issues/144
  > # (since we use makeCluster() etc via palply)
  > Sys.setenv("R_TESTS" = "") 
  > 
  > test_check("CHNOSZ")
  ── 1. Error: palply() launches calculations on multiple cores (@test-util.progra
  cannot open the connection
  1: expect_message(palply("", 1:length(x), function(i) i^2), "running 1001 calculations") at testthat/test-util.program.R:11
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: palply("", 1:length(x), function(i) i^2)
  7: parallel::makeCluster(nCores, methods = FALSE)
  8: makePSOCKcluster(names = spec, ...)
  9: newPSOCKnode(names[[i]], options = options, rank = i)
  10: socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, open = "a+b", 
         timeout = timeout)
  
  ── 2. Error: other functions are calling palply() properly (@test-util.program.R
  cannot open the connection
  1: expect_message(a <- affinity(iprotein = rep(ip, 3)), "affinity running .* calculations") at testthat/test-util.program.R:22
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: affinity(iprotein = rep(ip, 3))
  7: palply("", jprotein, protein.fun)
  8: parallel::makeCluster(nCores, methods = FALSE)
  9: makePSOCKcluster(names = spec, ...)
  10: newPSOCKnode(names[[i]], options = options, rank = i)
  11: socketConnection("localhost", port = port, server = TRUE, blocking = TRUE, open = "a+b", 
         timeout = timeout)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 463 SKIPPED: 0 FAILED: 2
  1. Error: palply() launches calculations on multiple cores (@test-util.program.R#11) 
  2. Error: other functions are calling palply() properly (@test-util.program.R#22) 
  
  Error: testthat unit tests failed
  Execution halted