Running ‘testthat.R’ [0m/35m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(StreamCatTools)
  > 
  > test_check("StreamCatTools")
  [ FAIL 10 | WARN 8 | SKIP 0 | PASS 51 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-lc_get_params.R:4:3'): lc_get_params for metric_names parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "metric_names") at test-lc_get_params.R:4:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:16:3'): lc_get_params for area of interest parameters ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "areaOfInterest") at test-lc_get_params.R:16:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:31:3'): lc_get_params for name parameters ──────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "metric_names") at test-lc_get_params.R:31:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:37:3'): lc_get_params for state parameters ─────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "state") at test-lc_get_params.R:37:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-lc_get_params.R:44:3'): lc_get_params for county parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/lakes/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::lc_get_params(param = "county") at test-lc_get_params.R:44:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/lakes/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:32:3'): sc_get_params for state parameters ─────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "state") at test-sc_get_params.R:32:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_get_params.R:39:3'): sc_get_params for county parameters ────
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_params(param = "county") at test-sc_get_params.R:39:3
   2.   └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   3.     └─jsonlite:::parse_and_simplify(...)
   4.       └─jsonlite:::parseJSON(txt, bigint_as_char)
   5.         └─jsonlite:::parse_con(txt, bigint_as_char)
   6.           ├─base::open(con, "rb")
   7.           └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:28:3'): sc_get_data for a hydroregion and ws metrics returns a data frame ──
  Error in `open.connection(con, "rb")`: cannot open the connection to 'https://api.epa.gov/StreamCat/streams/metrics'
  Backtrace:
      ▆
   1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:28:3
   2.   └─StreamCatTools::sc_get_params(param = "metric_names")
   3.     └─jsonlite::fromJSON("https://api.epa.gov/StreamCat/streams/metrics")
   4.       └─jsonlite:::parse_and_simplify(...)
   5.         └─jsonlite:::parseJSON(txt, bigint_as_char)
   6.           └─jsonlite:::parse_con(txt, bigint_as_char)
   7.             ├─base::open(con, "rb")
   8.             └─base::open.connection(con, "rb")
  ── Error ('test-sc_getdata.R:44:3'): sc_get_data for all ws metrics for a COMID returns a data frame ──
  <httr2_http_504/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(httr2::req_retry(httr2::req_throttle(httr2::req_body_form(httr2::req_method(httr2::req_headers(httr2::req_method(req, 
      "POST"), `Content-Type` = "application/x-www-form-urlencoded"), 
      "POST"), !!!header_data), rate = 30/60), backoff = ~5, max_tries = 3))`: HTTP 504 Gateway Timeout.
  Backtrace:
       ▆
    1. └─StreamCatTools::sc_get_data(...) at test-sc_getdata.R:44:3
    2.   ├─jsonlite::fromJSON(...)
    3.   ├─httr2::resp_body_string(...)
    4.   │ └─httr2:::check_response(resp)
    5.   │   └─httr2:::is_response(resp)
    6.   └─httr2::req_perform(...)
    7.     └─httr2:::handle_resp(req, resp, error_call = error_call)
    8.       └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
    9.         ├─rlang::catch_cnd(...)
   10.         │ ├─rlang::eval_bare(...)
   11.         │ ├─base::tryCatch(...)
   12.         │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   13.         │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   14.         │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   15.         │ └─base::force(expr)
   16.         └─rlang::abort(...)
  ── Error ('test-sc_nlcd.R:13:3'): sc_get_data for a county and ws metrics returns a data frame ──
  <httr2_http_504/httr2_http/httr2_error/rlang_error/rlang_error/error/condition>
  Error in `httr2::req_perform(httr2::req_retry(httr2::req_throttle(httr2::req_body_form(httr2::req_method(httr2::req_headers(httr2::req_method(req, 
      "POST"), `Content-Type` = "application/x-www-form-urlencoded"), 
      "POST"), !!!header_data), rate = 30/60), backoff = ~5, max_tries = 3))`: HTTP 504 Gateway Timeout.
  Backtrace:
       ▆
    1. └─StreamCatTools::sc_nlcd(year = "2006, 2019", aoi = "ws", county = "41003") at test-sc_nlcd.R:13:3
    2.   └─StreamCatTools::sc_get_data(...)
    3.     ├─jsonlite::fromJSON(...)
    4.     ├─httr2::resp_body_string(...)
    5.     │ └─httr2:::check_response(resp)
    6.     │   └─httr2:::is_response(resp)
    7.     └─httr2::req_perform(...)
    8.       └─httr2:::handle_resp(req, resp, error_call = error_call)
    9.         └─httr2:::resp_failure_cnd(req, resp, error_call = error_call)
   10.           ├─rlang::catch_cnd(...)
   11.           │ ├─rlang::eval_bare(...)
   12.           │ ├─base::tryCatch(...)
   13.           │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   14.           │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   15.           │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   16.           │ └─base::force(expr)
   17.           └─rlang::abort(...)
  
  [ FAIL 10 | WARN 8 | SKIP 0 | PASS 51 ]
  Error: Test failures
  Execution halted