Running ‘testthat.R’ [1s/223s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(rfinance)
  > 
  > test_check("rfinance")
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-get_prices.R:2:3): get_prices works ─────────────────────────────
  Error in `open.connection(x, "rb")`: Timeout was reached: [en.wikipedia.org] Resolving timed out after 10000 milliseconds
  Backtrace:
       ▆
    1. ├─base::sample(rfinance::get_sp500(), 1) at test-get_prices.R:2:2
    2. └─rfinance::get_sp500()
    3.   └─rfinance getTickersFromPage(SP500)
    4.     ├─xml2::read_html(sp[["wiki"]])
    5.     └─xml2:::read_html.default(sp[["wiki"]])
    6.       ├─base::suppressWarnings(...)
    7.       │ └─base::withCallingHandlers(...)
    8.       ├─xml2::read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
    9.       └─xml2:::read_xml.character(...)
   10.         └─xml2:::read_xml.connection(...)
   11.           ├─base::open(x, "rb")
   12.           └─base::open.connection(x, "rb")
  ── Error (test-get_sp500.R:3:3): get_sp500 returns something ───────────────────
  Error in `open.connection(x, "rb")`: Timeout was reached: [en.wikipedia.org] Resolving timed out after 10000 milliseconds
  Backtrace:
       ▆
    1. └─rfinance::get_sp500() at test-get_sp500.R:3:2
    2.   └─rfinance getTickersFromPage(SP500)
    3.     ├─xml2::read_html(sp[["wiki"]])
    4.     └─xml2:::read_html.default(sp[["wiki"]])
    5.       ├─base::suppressWarnings(...)
    6.       │ └─base::withCallingHandlers(...)
    7.       ├─xml2::read_xml(x, encoding = encoding, ..., as_html = TRUE, options = options)
    8.       └─xml2:::read_xml.character(...)
    9.         └─xml2:::read_xml.connection(...)
   10.           ├─base::open(x, "rb")
   11.           └─base::open.connection(x, "rb")
  ── Error (test-get_statements.R:2:3): get_statements outputs a data.frame ──────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [finten.weirwood.ai] Resolving timed out after 10000 milliseconds
  Backtrace:
       ▆
    1. └─rfinance::get_statements("MSFT") at test-get_statements.R:2:2
    2.   └─rfinance:::check_credentials()
    3.     └─rfinance::log_in("rfinance", "rfinance")
    4.       └─ConnectionHandler$new(username, password)
    5.         └─rfinance initialize(...)
    6.           └─private$read_credentials(username, password)
    7.             └─httr::POST(...)
    8.               └─httr:::request_perform(req, hu$handle$handle)
    9.                 ├─httr:::request_fetch(req$output, req$url, handle)
   10.                 └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   11.                   └─curl::curl_fetch_memory(url, handle = handle)
  ── Error (test-get_tickers.R:2:3): get_tickers returns something ───────────────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [finten.weirwood.ai] Resolving timed out after 10000 milliseconds
  Backtrace:
       ▆
    1. └─rfinance::get_tickers() at test-get_tickers.R:2:2
    2.   └─rfinance::log_in(NULL, NULL)
    3.     └─ConnectionHandler$new(username, password)
    4.       └─rfinance initialize(...)
    5.         └─private$read_credentials(username, password)
    6.           └─httr::POST(...)
    7.             └─httr:::request_perform(req, hu$handle$handle)
    8.               ├─httr:::request_fetch(req$output, req$url, handle)
    9.               └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   10.                 └─curl::curl_fetch_memory(url, handle = handle)
  ── Error (test-log_in.R:2:3): log_in creates a connection instance ─────────────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [finten.weirwood.ai] Resolving timed out after 10000 milliseconds
  Backtrace:
      ▆
   1. └─rfinance::log_in(NULL, NULL) at test-log_in.R:2:2
   2.   └─ConnectionHandler$new(username, password)
   3.     └─rfinance initialize(...)
   4.       └─private$read_credentials(username, password)
   5.         └─httr::POST(...)
   6.           └─httr:::request_perform(req, hu$handle$handle)
   7.             ├─httr:::request_fetch(req$output, req$url, handle)
   8.             └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   9.               └─curl::curl_fetch_memory(url, handle = handle)
  ── Error (test-log_in.R:7:3): log_out removes a connection instance ────────────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [finten.weirwood.ai] Resolving timed out after 10000 milliseconds
  Backtrace:
      ▆
   1. └─rfinance::log_in(NULL, NULL) at test-log_in.R:7:2
   2.   └─ConnectionHandler$new(username, password)
   3.     └─rfinance initialize(...)
   4.       └─private$read_credentials(username, password)
   5.         └─httr::POST(...)
   6.           └─httr:::request_perform(req, hu$handle$handle)
   7.             ├─httr:::request_fetch(req$output, req$url, handle)
   8.             └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   9.               └─curl::curl_fetch_memory(url, handle = handle)
  
  [ FAIL 6 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  In addition: Warning messages:
  1: In for (i in 1:length(args)) { :
    closing unused connection 4 (https://en.wikipedia.org/wiki/List_of_S%26P_500_companies)
  2: In for (i in seq_len(n)) { :
    closing unused connection 4 (https://en.wikipedia.org/wiki/List_of_S%26P_500_companies)
  Execution halted