Running ‘testthat.R’ [8s/116s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("dataverse")
  > 
  > if (!requireNamespace("yaml", quietly = TRUE)) {
  +   warning("The 'yaml' package must be present to test the dataverse package.")
  + } else if (!requireNamespace("checkmate", quietly = TRUE)) {
  +   warning("The 'checkmate' package must be present to test the dataverse package.")
  + } else {
  +   server  <- Sys.getenv("DATAVERSE_SERVER")
  +   key     <- Sys.getenv("DATAVERSE_KEY")
  + 
  +   if (server == "" | key == "") {
  +     config  <- yaml::read_yaml(system.file("constants.yml", package="dataverse"))
  +     # config  <- yaml::read_yaml("inst/constants.yml")
  + 
  +     Sys.setenv("DATAVERSE_SERVER" = config$server)
  +     Sys.setenv("DATAVERSE_KEY"    = config$api_token)
  + 
  +     if (as.Date(config$api_token_expiration) < Sys.Date()) {
  +       stop(
  +         "The API token expired on `",
  +         config$api_token_expiration,
  +         "`, so the tests would probably fail.  ",
  +         "Please regenerate a new token and update `inst/constants.yml`"
  +       )
  +     }
  +     rm(config)
  +   }
  +   rm(server, key)
  + 
  +   message("Using Dataverse server `", Sys.getenv("DATAVERSE_SERVER"), "`.")
  + 
  +   test_check("dataverse")
  + }
  Using Dataverse server `demo.dataverse.org`.
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (tests-search.R:5:5): simple search query ─────────────────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10001 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:5:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(dataverse_search("Gary King", key = "", server = "dataverse.harvard.edu"))
    5. └─dataverse::dataverse_search("Gary King", key = "", server = "dataverse.harvard.edu")
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:10:5): named argument search ──────────────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10000 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:10:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(...)
    5. └─dataverse::dataverse_search(...)
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:15:5): simple search w/type argument ──────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10001 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:15:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(...)
    5. └─dataverse::dataverse_search(...)
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:20:5): date range search using fq ─────────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10001 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:20:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(...)
    5. └─dataverse::dataverse_search(...)
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:25:5): publication year using fq ──────────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10001 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:25:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(...)
    5. └─dataverse::dataverse_search(...)
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:30:5): filter dataverses by subject using fq ──────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10000 milliseconds
  Backtrace:
       █
    1. ├─testthat::expect_true(...) tests-search.R:30:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::is.data.frame(...)
    5. └─dataverse::dataverse_search(...)
    6.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
    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 (tests-search.R:35:5): empty fq search ────────────────────────────────
  Error: Timeout was reached: [dataverse.harvard.edu] Connection timed out after 10001 milliseconds
  Backtrace:
      █
   1. ├─testthat::expect_length(...) tests-search.R:35:4
   2. │ └─testthat::quasi_label(enquo(object), arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─dataverse::dataverse_search(...)
   5.   └─httr::GET(u, httr::add_headers(`X-Dataverse-key` = key), query = query)
   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 7 | WARN 0 | SKIP 0 | PASS 98 ]
  Error: Test failures
  Execution halted