Running ‘testthat.R’ [15s/37s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(chopper)
  > 
  > test_check("chopper")
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 13 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-main.R:4:3'): tbats_predictor works correctly on TSLA.Close ────
  Error in `serverSocket(port = port)`: creation of server socket failed: port 11573 cannot be opened
  Backtrace:
      ▆
   1. └─chopper:::tbats_predictor(ts_set$TSLA.Close, h = 3) at test-main.R:4:3
   2.   └─forecast::tbats(ts)
   3.     └─forecast::bats(...)
   4.       └─parallel::makeCluster(num.cores)
   5.         └─parallel::makePSOCKcluster(names = spec, ...)
   6.           └─base::serverSocket(port = port)
  ── Error ('test-main.R:43:3'): chopper handles longer horizon on TSLA.Close ────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map(s_points, ~product_of_experts(ts[.x:n_length], horizon, n_samples, 
      alt_mode, ts))`: i In index: 1.
  Caused by error in `serverSocket()`:
  ! creation of server socket failed: port 11573 cannot be opened
  Backtrace:
       ▆
    1. ├─chopper::chopper(ts_set$TSLA.Close, horizon = 10, n_samples = 100) at test-main.R:43:3
    2. │ └─purrr::map(...)
    3. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    4. │     ├─purrr:::with_indexed_errors(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     ├─purrr:::call_with_cleanup(...)
    7. │     └─chopper (local) .f(.x[[i]], ...)
    8. │       └─chopper:::product_of_experts(...)
    9. │         └─chopper:::tbats_predictor(ts, horizon, alt_mode)
   10. │           └─forecast::tbats(ts)
   11. │             └─forecast::bats(...)
   12. │               └─parallel::makeCluster(num.cores)
   13. │                 └─parallel::makePSOCKcluster(names = spec, ...)
   14. │                   └─base::serverSocket(port = port)
   15. └─base::.handleSimpleError(...)
   16.   └─purrr (local) h(simpleError(msg, call))
   17.     └─cli::cli_abort(...)
   18.       └─rlang::abort(...)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 13 ]
  Error: Test failures
  Execution halted