Running ‘test-all.R’ [6s/12s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library("testthat")
  > test_check("citecorp")
  Loading required package: citecorp
  [ FAIL 14 | WARN 0 | SKIP 0 | PASS 14 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-oc_coci.R:12:5'): oc_coci_refs works ───────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 35 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:11:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_refs(doi1) at test-oc_coci.R:12:5
    4. │ ├─citecorp:::lst2df_tbl(...)
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_coci_stub(...)
   12. │       └─citecorp:::oc_GET(...)
   13. │         └─cli$get(path, query = args)
   14. │           └─private$make_request(rr)
   15. │             └─crul:::crul_fetch(opts)
   16. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   17. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:33:5'): oc_coci_refs - many dois ─────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 40 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:32:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_refs(c(doi1, doi3)) at test-oc_coci.R:33:5
    4. │ ├─citecorp:::lst2df_tbl(...)
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_coci_stub(...)
   12. │       └─citecorp:::oc_GET(...)
   13. │         └─cli$get(path, query = args)
   14. │           └─private$make_request(rr)
   15. │             └─crul:::crul_fetch(opts)
   16. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   17. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:47:5'): oc_coci_cites works ──────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 32 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:46:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_cites(doi1) at test-oc_coci.R:47:5
    4. │ ├─citecorp:::lst2df_tbl(...)
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_coci_stub(...)
   12. │       └─citecorp:::oc_GET(...)
   13. │         └─cli$get(path, query = args)
   14. │           └─private$make_request(rr)
   15. │             └─crul:::crul_fetch(opts)
   16. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   17. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:67:5'): oc_coci_cites - many dois ────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 31 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:66:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_cites(c(doi1, doi3)) at test-oc_coci.R:67:5
    4. │ ├─citecorp:::lst2df_tbl(...)
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_coci_stub(...)
   12. │       └─citecorp:::oc_GET(...)
   13. │         └─cli$get(path, query = args)
   14. │           └─private$make_request(rr)
   15. │             └─crul:::crul_fetch(opts)
   16. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   17. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:81:5'): oc_coci_meta works ───────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 28 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:80:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_meta(doi1) at test-oc_coci.R:81:5
    4. │ └─citecorp:::oc_coci_stub(...)
    5. │   └─citecorp:::oc_GET(...)
    6. │     └─cli$get(path, query = args)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:100:5'): oc_coci_meta - many dois ────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 32 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:99:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_meta(c(doi1, doi3)) at test-oc_coci.R:100:5
    4. │ └─citecorp:::oc_coci_stub(...)
    5. │   └─citecorp:::oc_GET(...)
    6. │     └─cli$get(path, query = args)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:114:5'): oc_coci_citation works ──────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 31 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:113:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_citation(oci1) at test-oc_coci.R:114:5
    4. │ ├─citecorp:::lst2df_tbl(lapply(oci, oc_coci_citation_one, ...))
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(oci, oc_coci_citation_one, ...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_GET(...)
   12. │       └─cli$get(path, query = args)
   13. │         └─private$make_request(rr)
   14. │           └─crul:::crul_fetch(opts)
   15. │             └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   16. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_coci.R:138:5'): oc_coci_citation - many dois ────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 35 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_coci.R:137:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_coci_citation(c(oci1, oci2)) at test-oc_coci.R:138:5
    4. │ ├─citecorp:::lst2df_tbl(lapply(oci, oc_coci_citation_one, ...))
    5. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    6. │ │ └─citecorp:::lst2df(x)
    7. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
    8. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
    9. │ └─base::lapply(oci, oc_coci_citation_one, ...)
   10. │   └─citecorp (local) FUN(X[[i]], ...)
   11. │     └─citecorp:::oc_GET(...)
   12. │       └─cli$get(path, query = args)
   13. │         └─private$make_request(rr)
   14. │           └─crul:::crul_fetch(opts)
   15. │             └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   16. └─curl:::raise_libcurl_error(...)
  ── Failure ('test-oc_coci.R:155:3'): citecorp catches cloudflare errors ────────
  `oc_coci_cites(doi1)` threw an error with unexpected class.
  Expected class: http_520
  Actual class:   curl_error_couldnt_connect/curl_error/error/condition
  Message:        Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 32 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─testthat::expect_error(oc_coci_cites(doi1), class = "http_520") at test-oc_coci.R:155:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─citecorp::oc_coci_cites(doi1)
    7. │ ├─citecorp:::lst2df_tbl(...)
    8. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    9. │ │ └─citecorp:::lst2df(x)
   10. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
   11. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
   12. │ └─base::lapply(...)
   13. │   └─citecorp (local) FUN(X[[i]], ...)
   14. │     └─citecorp:::oc_coci_stub(...)
   15. │       └─citecorp:::oc_GET(...)
   16. │         └─cli$get(path, query = args)
   17. │           └─private$make_request(rr)
   18. │             └─crul:::crul_fetch(opts)
   19. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   20. └─curl:::raise_libcurl_error(...)
  ── Failure ('test-oc_coci.R:160:3'): citecorp catches cloudflare errors ────────
  `oc_coci_cites(doi3)` threw an error with unexpected class.
  Expected class: http_524
  Actual class:   curl_error_couldnt_connect/curl_error/error/condition
  Message:        Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 32 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─testthat::expect_error(oc_coci_cites(doi3), class = "http_524") at test-oc_coci.R:160:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─citecorp::oc_coci_cites(doi3)
    7. │ ├─citecorp:::lst2df_tbl(...)
    8. │ │ ├─base::structure(lst2df(x), class = c("tbl_df", "tbl", "data.frame"))
    9. │ │ └─citecorp:::lst2df(x)
   10. │ │   ├─data.table::setDF(data.table::rbindlist(x, fill = TRUE, use.names = TRUE))
   11. │ │   └─data.table::rbindlist(x, fill = TRUE, use.names = TRUE)
   12. │ └─base::lapply(...)
   13. │   └─citecorp (local) FUN(X[[i]], ...)
   14. │     └─citecorp:::oc_coci_stub(...)
   15. │       └─citecorp:::oc_GET(...)
   16. │         └─cli$get(path, query = args)
   17. │           └─private$make_request(rr)
   18. │             └─crul:::crul_fetch(opts)
   19. │               └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   20. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_lookup.R:6:5'): oc_doi2ids works ────────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 29 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_lookup.R:5:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_doi2ids("10.1097/igc.0000000000000609") at test-oc_lookup.R:6:5
    4. │ └─citecorp:::cp_query(qry, ...)
    5. │   └─citecorp:::oc_sparql_GET(...)
    6. │     └─cli$get(path, query = qry)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_lookup.R:16:5'): oc_doi2ids works ───────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 34 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_lookup.R:15:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_doi2ids("10.1093/biomet/80.3.527") at test-oc_lookup.R:16:5
    4. │ └─citecorp:::cp_query(qry, ...)
    5. │   └─citecorp:::oc_sparql_GET(...)
    6. │     └─cli$get(path, query = qry)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_lookup.R:39:5'): oc_pmid2ids works ──────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 31 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_lookup.R:38:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_pmid2ids("26645990") at test-oc_lookup.R:39:5
    4. │ └─citecorp:::cp_query(qry, ...)
    5. │   └─citecorp:::oc_sparql_GET(...)
    6. │     └─cli$get(path, query = qry)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  ── Error ('test-oc_lookup.R:57:5'): oc_pmcid2ids works ─────────────────────────
  <curl_error_couldnt_connect/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(x$url$url, handle = x$url$handle)`: Could not connect to server [opencitations.net]:
  Failed to connect to opencitations.net port 80 after 32 ms: Could not connect to server
  Backtrace:
       ▆
    1. ├─vcr::use_cassette(...) at test-oc_lookup.R:56:3
    2. │ └─cassette$call_block(...)
    3. ├─citecorp::oc_pmcid2ids("PMC4679344") at test-oc_lookup.R:57:5
    4. │ └─citecorp:::cp_query(qry, ...)
    5. │   └─citecorp:::oc_sparql_GET(...)
    6. │     └─cli$get(path, query = qry)
    7. │       └─private$make_request(rr)
    8. │         └─crul:::crul_fetch(opts)
    9. │           └─curl::curl_fetch_memory(x$url$url, handle = x$url$handle)
   10. └─curl:::raise_libcurl_error(...)
  
  [ FAIL 14 | WARN 0 | SKIP 0 | PASS 14 ]
  Error: Test failures
  Execution halted