Running ‘testthat.R’ [4s/187s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rnrfa")
  +--------------------------------------------------+
  | Acknowledgement:                                 |
  | Data from the UK National River Flow Archive     |
  | Terms & Conditions:                              |
  | http://nrfa.ceh.ac.uk/costs-terms-and-conditions |
  +--------------------------------------------------+
  > library("lintr")
  > 
  > if (!curl::has_internet()) {
  +   message("No internet, cannot run tests")
  + }else{
  +   test_check("rnrfa")
  + }
  ── 1. Error: Output of catalogue function is expected to be at least 1539x20 (@t
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: catalogue() at testthat/test-catalogue.R:5
  2: nrfa_api(webservice = "station-info", parameters)
  3: httr::GET(url = url, query = parameters, ua)
  4: request_perform(req, hu$handle$handle)
  5: request_fetch(req$output, req$url, handle)
  6: request_fetch.write_memory(req$output, req$url, handle)
  7: curl::curl_fetch_memory(url, handle = handle)
  
  ── 2. Error: Check output of catalogue for Plynlimon area (@test-catalogue.R#12)
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: expect_that(dim(catalogue(bbox = list(lon_min = -3.82, lon_max = -3.63, lat_min = 52.43, 
         lat_max = 52.52)))[1], equals(9)) at testthat/test-catalogue.R:12
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label, arg = "object")
  5: eval_bare(get_expr(quo), get_env(quo))
  6: catalogue(bbox = list(lon_min = -3.82, lon_max = -3.63, lat_min = 52.43, lat_max = 52.52))
  7: nrfa_api(webservice = "station-info", parameters)
  8: httr::GET(url = url, query = parameters, ua)
  9: request_perform(req, hu$handle$handle)
  10: request_fetch(req$output, req$url, handle)
  11: request_fetch.write_memory(req$output, req$url, handle)
  12: curl::curl_fetch_memory(url, handle = handle)
  
  ── 3. Error: Check output of catalogue for minimum records of 100 years (@test-c
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: catalogue(min_rec = 100) at testthat/test-catalogue.R:20
  2: nrfa_api(webservice = "station-info", parameters)
  3: httr::GET(url = url, query = parameters, ua)
  4: request_perform(req, hu$handle$handle)
  5: request_fetch(req$output, req$url, handle)
  6: request_fetch.write_memory(req$output, req$url, handle)
  7: curl::curl_fetch_memory(url, handle = handle)
  
  ── 4. Error: Check the catalogue function filters based on column values (@test-
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: catalogue(column_name = "river", column_value = "Wye") at testthat/test-catalogue.R:40
  2: nrfa_api(webservice = "station-info", parameters)
  3: httr::GET(url = url, query = parameters, ua)
  4: request_perform(req, hu$handle$handle)
  5: request_fetch(req$output, req$url, handle)
  6: request_fetch.write_memory(req$output, req$url, handle)
  7: curl::curl_fetch_memory(url, handle = handle)
  
  ── 5. Error: Output of cmr function for single station (@test-cmr.R#5)  ────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: cmr(id = 18019, metadata = FALSE, cl = NULL) at testthat/test-cmr.R:5
  2: get_ts(id, type = "cmr", metadata, cl, verbose)
  3: unlist(get_ts_internal(id, type, metadata, verbose))
  4: get_ts_internal(id, type, metadata, verbose)
  5: nrfa_api(webservice = "time-series", parameters)
  6: httr::GET(url = url, query = parameters, ua)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 6. Error: Output of cmr function for multiple stations (@test-cmr.R#22)  ────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: cmr(id = ids, metadata = FALSE, cl = NULL) at testthat/test-cmr.R:22
  2: get_ts(id, type = "cmr", metadata, cl, verbose)
  3: lapply(X = as.list(id), FUN = get_ts_internal, type, metadata, verbose)
  4: FUN(X[[i]], ...)
  5: nrfa_api(webservice = "time-series", parameters)
  6: httr::GET(url = url, query = parameters, ua)
  7: request_perform(req, hu$handle$handle)
  8: request_fetch(req$output, req$url, handle)
  9: request_fetch.write_memory(req$output, req$url, handle)
  10: curl::curl_fetch_memory(url, handle = handle)
  
  ── 7. Error: Output of gdf function for id 18019 (@test-gdf.R#5)  ──────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: expect_that(dim(gdf(18019))[1] >= 729, equals(TRUE)) at testthat/test-gdf.R:5
  2: condition(object)
  3: expect_equal(x, expected, ..., expected.label = label)
  4: quasi_label(enquo(object), label, arg = "object")
  5: eval_bare(get_expr(quo), get_env(quo))
  6: gdf(18019)
  7: get_ts(id, type = "gdf", metadata, cl, verbose)
  8: unlist(get_ts_internal(id, type, metadata, verbose))
  9: get_ts_internal(id, type, metadata, verbose)
  10: nrfa_api(webservice = "time-series", parameters)
  11: httr::GET(url = url, query = parameters, ua)
  12: request_perform(req, hu$handle$handle)
  13: request_fetch(req$output, req$url, handle)
  14: request_fetch.write_memory(req$output, req$url, handle)
  15: curl::curl_fetch_memory(url, handle = handle)
  
  ── 8. Error: get_ts cmr single works (@test-get_ts.R#18)  ──────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: get_ts(id = 18019, type = "cmr") at testthat/test-get_ts.R:18
  2: unlist(get_ts_internal(id, type, metadata, verbose))
  3: get_ts_internal(id, type, metadata, verbose)
  4: nrfa_api(webservice = "time-series", parameters)
  5: httr::GET(url = url, query = parameters, ua)
  6: request_perform(req, hu$handle$handle)
  7: request_fetch(req$output, req$url, handle)
  8: request_fetch.write_memory(req$output, req$url, handle)
  9: curl::curl_fetch_memory(url, handle = handle)
  
  ── 9. Error: get_ts cmr multi works (@test-get_ts.R#25)  ───────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: get_ts(id = c(54022, 54090, 54091), type = "cmr") at testthat/test-get_ts.R:25
  2: lapply(X = as.list(id), FUN = get_ts_internal, type, metadata, verbose)
  3: FUN(X[[i]], ...)
  4: nrfa_api(webservice = "time-series", parameters)
  5: httr::GET(url = url, query = parameters, ua)
  6: request_perform(req, hu$handle$handle)
  7: request_fetch(req$output, req$url, handle)
  8: request_fetch.write_memory(req$output, req$url, handle)
  9: curl::curl_fetch_memory(url, handle = handle)
  
  ── 10. Error: get_ts gdf single works (@test-get_ts.R#34)  ─────────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_ts(id = 18019, type = "gdf") at testthat/test-get_ts.R:34
  2: unlist(get_ts_internal(id, type, metadata, verbose))
  3: get_ts_internal(id, type, metadata, verbose)
  4: nrfa_api(webservice = "time-series", parameters)
  5: httr::GET(url = url, query = parameters, ua)
  6: request_perform(req, hu$handle$handle)
  7: request_fetch(req$output, req$url, handle)
  8: request_fetch.write_memory(req$output, req$url, handle)
  9: curl::curl_fetch_memory(url, handle = handle)
  
  ── 11. Error: get_ts gdf multi works (@test-get_ts.R#42)  ──────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: get_ts(id = c(54022, 54090, 54091), type = "gdf") at testthat/test-get_ts.R:42
  2: lapply(X = as.list(id), FUN = get_ts_internal, type, metadata, verbose)
  3: FUN(X[[i]], ...)
  4: nrfa_api(webservice = "time-series", parameters)
  5: httr::GET(url = url, query = parameters, ua)
  6: request_perform(req, hu$handle$handle)
  7: request_fetch(req$output, req$url, handle)
  8: request_fetch.write_memory(req$output, req$url, handle)
  9: curl::curl_fetch_memory(url, handle = handle)
  
  ── 12. Error: get_ts gdf works in parallel (@test-get_ts.R#58)  ────────────────
  one node produced an error: Timeout was reached: Connection timed out after 10001 milliseconds
  1: gdf(id = c(54022, 54090, 54091), cl = cl) at testthat/test-get_ts.R:58
  2: get_ts(id, type = "gdf", metadata, cl, verbose)
  3: parallel::parLapply(cl = cl, X = as.list(id), fun = get_ts_internal, type, metadata, 
         verbose)
  4: do.call(c, clusterApply(cl = cl, x = splitList(X, nchunks), fun = lapply, FUN = fun, 
         ...), quote = TRUE)
  5: clusterApply(cl = cl, x = splitList(X, nchunks), fun = lapply, FUN = fun, ...)
  6: staticClusterApply(cl, fun, length(x), argfun)
  7: checkForRemoteErrors(val)
  8: stop("one node produced an error: ", firstmsg, domain = NA)
  
  ── 13. Error: seasonal_averages works (@test-seasonal_averages.R#5)  ───────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: seasonal_averages(cmr(18019), season = "Spring") at testthat/test-seasonal_averages.R:5
  2: as.list(timeseries)
  3: cmr(18019)
  4: get_ts(id, type = "cmr", metadata, cl, verbose)
  5: unlist(get_ts_internal(id, type, metadata, verbose))
  6: get_ts_internal(id, type, metadata, verbose)
  7: nrfa_api(webservice = "time-series", parameters)
  8: httr::GET(url = url, query = parameters, ua)
  9: request_perform(req, hu$handle$handle)
  10: request_fetch(req$output, req$url, handle)
  11: request_fetch.write_memory(req$output, req$url, handle)
  12: curl::curl_fetch_memory(url, handle = handle)
  
  ── 14. Error: station_ids works (@test-station_ids.R#4)  ───────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: station_ids() at testthat/test-station_ids.R:4
  2: nrfa_api(webservice = "station-ids", parameters)
  3: httr::GET(url = url, query = parameters, ua)
  4: request_perform(req, hu$handle$handle)
  5: request_fetch(req$output, req$url, handle)
  6: request_fetch.write_memory(req$output, req$url, handle)
  7: curl::curl_fetch_memory(url, handle = handle)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 17 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 14 ]
  1. Error: Output of catalogue function is expected to be at least 1539x20 (@test-catalogue.R#5) 
  2. Error: Check output of catalogue for Plynlimon area (@test-catalogue.R#12) 
  3. Error: Check output of catalogue for minimum records of 100 years (@test-catalogue.R#20) 
  4. Error: Check the catalogue function filters based on column values (@test-catalogue.R#40) 
  5. Error: Output of cmr function for single station (@test-cmr.R#5) 
  6. Error: Output of cmr function for multiple stations (@test-cmr.R#22) 
  7. Error: Output of gdf function for id 18019 (@test-gdf.R#5) 
  8. Error: get_ts cmr single works (@test-get_ts.R#18) 
  9. Error: get_ts cmr multi works (@test-get_ts.R#25) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted