Running ‘testthat.R’ [27s/42s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > # Set environmental variable to prevent hang on quitting the `R` session.
  > # Error message:
  > # - `Error while shutting down parallel: unable to terminate some child processes`
  > # See:
  > # - https://github.com/r-lib/processx/issues/310
  > # - https://github.com/r-lib/processx/issues/240
  > # - https://github.com/r-lib/callr/issues/158
  > Sys.setenv(PROCESSX_NOTIFY_OLD_SIGCHLD = "true")
  > 
  > library(testthat)
  > library(parabar)
  > 
  > test_check("parabar")
  Error in `rs_call(self, private, func, args, package)`:
  ! R session busy
  ---
  Backtrace:
   1. testthat::test_check("parabar")
   2. testthat::test_dir("testthat", package = package, reporter = reporter, ...
   3. testthat:::test_files(test_dir = path, test_paths = test_paths, test_package = pack...
   4. testthat:::test_files_serial(test_dir = test_dir, test_package = test_package, ...
   5. testthat::with_reporter(reporters$multi, lapply(test_paths, test_one_file, ...
   6. base::tryCatch(code, testthat_abort_reporter = function(cnd) { ...
   7. base::tryCatchList(expr, classes, parentenv, handlers)
   8. base::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9. base::doTryCatch(return(expr), name, parentenv, handler)
  10. base::lapply(test_paths, test_one_file, env = env, desc = desc, error_call = e...
  11. local FUN(X[[i]], ...)
  12. testthat::source_file(path, env = env(env), desc = desc, error_call = error_call)
  13. testthat:::test_code(test = NULL, code = exprs, env = env, default_reporter = StopR...
  14. base::tryCatch(withCallingHandlers({ ...
  15. base::tryCatchList(expr, classes, parentenv, handlers)
  16. base::tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), ...
  17. base::doTryCatch(return(expr), name, parentenv, handler)
  18. base::tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  19. base::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  20. base::doTryCatch(return(expr), name, parentenv, handler)
  21. base::withCallingHandlers({ ...
  22. base::eval(code, test_env)
  23. base::eval(code, test_env)
  24. testthat::test_that("'Context' performs operations on the cluster correctly", ... at test-context.R:39:1
  25. testthat:::test_code(desc, code, env = parent.frame(), default_reporter = local_int...
  26. base::tryCatch(withCallingHandlers({ ...
  27. base::tryCatchList(expr, classes, parentenv, handlers)
  28. base::tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), ...
  29. base::doTryCatch(return(expr), name, parentenv, handler)
  30. base::tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  31. base::tryCatchOne(expr, names, parentenv, handlers[[1L]])
  32. base::doTryCatch(return(expr), name, parentenv, handler)
  33. base::withCallingHandlers({ ...
  34. base::eval(code, test_env)
  35. base::eval(code, test_env)
  36. local tests_set_for_asynchronous_backend_operations(context, specification, ... at test-context.R:74:5
  37. testthat::expect_error(service$apply(x, c(1, 1), task, y = y, z = z), as_text(Exce... at helpers.R:479:5
  38. testthat:::expect_condition_matching("error", { ...
  39. testthat:::quasi_capture(enquo(object), label, capture_matching_condition, ...
  40. local .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)), ...
  41. base::withCallingHandlers(expr, condition = function(cnd) { ...
  42. rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  43. service$apply(x, c(1, 1), task, y = y, z = z)
  44. private$.backend$apply(x = x, margin = margin, fun = fun, ...)
  45. Helper$check_array_margins(margin, dim(x))
  46. Exception$array_margins_not_compatible(margins, dimensions)
  47. base::stop(message, call. = FALSE)
  48. | base::.handleSimpleError(function (cnd) ...
  49. local h(simpleError(msg, call))
  50. rlang::cnd_entrace(cnd)
  51. rlang::trace_back(top = top, bottom = bottom)
  52. rlang:::map2(calls, seq_along(calls), call_trace_context)
  53. base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
  54. (function (call, fn) ...
  55. rlang::call_name(call)
  56. rlang:::call_type(call)
  57. base::stopifnot(typeof(x) == "language")
  58. base::(function (e) ...
  59. .subset2(e, "finalize")()
  60. private$.stop()
  61. private$.close_cluster()
  62. private$.cluster$run(function() { ...
  63. callr:::rs_run(self, private, func, args, package)
  64. callr:::rs_run_with_output(self, private, func, args, package)
  65. self$call(func, args, package)
  66. callr:::rs_call(self, private, func, args, package)
  67. callr:::throw(new_error("R session busy"))
  [ FAIL 2 | WARN 0 | SKIP 3 | PASS 354 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • On Linux (2): 'test-specification.R:104:5', 'test-user-api.R:164:5'
  • Test only runs in interactive contexts. (1): 'test-user-api.R:379:9'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-async-backend.R:62:5'): 'AsyncBackend' performs operations on the cluster correctly ──
  Error: A task is completed with unread results.
  Backtrace:
       ▆
    1. └─parabar:::tests_set_for_asynchronous_backend_operations(...) at test-async-backend.R:62:5
    2.   └─parabar:::tests_set_for_asynchronous_backend_task_execution(...) at tests/testthat/helpers.R:469:5
    3.     ├─testthat::expect_error(eval(operation), as_text(Exception$async_task_running())) at tests/testthat/helpers.R:345:5
    4.     │ └─testthat:::expect_condition_matching(...)
    5.     │   └─testthat:::quasi_capture(...)
    6.     │     ├─testthat (local) .capture(...)
    7.     │     │ └─base::withCallingHandlers(...)
    8.     │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9.     ├─base::eval(operation)
   10.     │ └─base::eval(operation)
   11.     └─service$apply(...)
   12.       └─private$.throw_if_backend_is_busy()
   13.         └─Exception$async_task_completed()
  ── Error ('test-async-backend.R:62:5'): 'AsyncBackend' performs operations on the cluster correctly ──
  <rlib_error_3_0/rlib_error/error/condition>
  Error in `"rs_call(self, private, func, args, package)"`: ! R session busy
  Backtrace:
       ▆
    1. └─parabar:::tests_set_for_asynchronous_backend_operations(...) at test-async-backend.R:62:5
    2.   └─service$stop() at tests/testthat/helpers.R:378:9
    3.     └─private$.stop()
    4.       └─private$.close_cluster()
    5.         └─private$.cluster$run(...)
    6.           └─callr:::rs_run(self, private, func, args, package)
    7.             └─callr:::rs_run_with_output(self, private, func, args, package)
    8.               └─self$call(func, args, package)
    9.                 └─callr:::rs_call(self, private, func, args, package)
   10.                   └─throw(new_error("R session busy"))
  
  [ FAIL 2 | WARN 0 | SKIP 3 | PASS 354 ]
  Error: Test failures
  Execution halted