Running ‘testthat.R’ [14s/76s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bikedata)
  Data for London, U.K. powered by TfL Open Data:
    Contains OS data Ⓒ Crown copyright and database rights 2016
  Data for New York City provided and owned by:
    NYC Bike Share, LLC and Jersey City Bike Share, LLC ("Bikeshare")
    see https://www.citibikenyc.com/data-sharing-policy
  Data for Washington DC (Captialbikeshare), Chiago (Divvybikes) and Boston (Hubway)
    provided and owned by Motivate International Inc.
    see https://www.capitalbikeshare.com/data-license-agreement
    and https://www.divvybikes.com/data-license-agreement
    and https://www.thehubway.com/data-license-agreement
  Nice Ride Minnesota license  https://www.niceridemn.org/data_license
  > 
  > test_check("bikedata")
  ── 1. Error: latest files (@test-db-stats.R#29)  ───────────────────────────────
  Timeout was reached: Connection timed out after 10001 milliseconds
  1: bike_latest_files(bikedb) at testthat/test-db-stats.R:29
  2: basename(get_bike_files(city = cities[i]))
  3: get_bike_files(city = cities[i])
  4: get_aws_bike_files(bucket)
  5: httr::content(httr::GET(aws_url), encoding = "UTF-8")
  6: stopifnot(is.response(x))
  7: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  8: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  ── 2. Error: db stats (@test-db-stats.R#41)  ───────────────────────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: bike_summary_stats(bikedb) at testthat/test-db-stats.R:41
  2: bike_latest_files(bikedb)
  3: basename(get_bike_files(city = cities[i]))
  4: get_bike_files(city = cities[i])
  5: get_aws_bike_files(bucket)
  6: httr::content(httr::GET(aws_url), encoding = "UTF-8")
  7: stopifnot(is.response(x))
  8: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  9: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  10: tryCatchList(expr, classes, parentenv, handlers)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: value[[3L]](cond)
  
  ── 3. Error: dl_bikedata nyc (@test-download-data.R#39)  ───────────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_fake_trip_files(bucket = "tripdata") at testthat/test-download-data.R:39
  2: httr::content(httr::GET(aws_url), encoding = "UTF-8") at testthat/test-download-data.R:17
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 4. Error: dl_bikedata dc (@test-download-data.R#54)  ────────────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_fake_trip_files(bucket = "capitalbikeshare-data") at testthat/test-download-data.R:54
  2: httr::content(httr::GET(aws_url), encoding = "UTF-8") at testthat/test-download-data.R:17
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 5. Error: dl_bikedata boston (@test-download-data.R#69)  ────────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: get_fake_trip_files(bucket = "hubway-data") at testthat/test-download-data.R:69
  2: httr::content(httr::GET(aws_url), encoding = "UTF-8") at testthat/test-download-data.R:17
  3: stopifnot(is.response(x))
  4: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  5: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  6: tryCatchList(expr, classes, parentenv, handlers)
  7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8: value[[3L]](cond)
  
  ── 6. Error: dl_bikedata chicago (@test-download-data.R#99)  ───────────────────
  Failed to connect to www.divvybikes.com port 443: Connection timed out
  1: httr::content(httr::GET(host), encoding = "UTF-8") %>% xml2::xml_find_all(., ".//aside") %>% 
         xml2::xml_find_all(., ".//a") at testthat/test-download-data.R:99
  2: eval(lhs, parent, parent)
  3: eval(lhs, parent, parent)
  4: httr::content(httr::GET(host), encoding = "UTF-8")
  5: stopifnot(is.response(x))
  6: withCallingHandlers(tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), 
         error = function(e) {
             e$call <- cl.i
             stop(e)
         }), warning = function(w) {
         w$call <- cl.i
         w
     })
  7: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
    adding: tmp/Rtmpycn9qk/Divvy_Trips_sample/ (stored 0%)
    adding: tmp/Rtmpycn9qk/Divvy_Trips_sample/Divvy_Trips_sample.csv (deflated 79%)
    adding: tmp/Rtmpycn9qk/Divvy_Trips_sample/Divvy_Stations.csv (deflated 68%)
    adding: tmp/Rtmpycn9qk/201701-hubway-tripdata.csv (deflated 81%)
    adding: tmp/Rtmpycn9qk/201801_hubway_tripdata.csv (deflated 81%)
    adding: tmp/Rtmpycn9qk/Nice_Ride_data_2012_season/ (stored 0%)
    adding: tmp/Rtmpycn9qk/Nice_Ride_data_2012_season/Nice_Ride_trip_history_2012_season.csv (deflated 81%)
    adding: tmp/Rtmpycn9qk/Nice_Ride_data_2012_season/Nice_Ride_2012-station_locations .csv (deflated 62%)
    adding: tmp/Rtmpycn9qk/2017Q1-capitalbikeshare-tripdata-temp.csv (deflated 80%)
    adding: tmp/Rtmpycn9qk/la_metro_gbfs_trips_Q1_2017.csv (deflated 85%)
    adding: tmp/Rtmpycn9qk/201612-citibike-tripdata.csv (deflated 74%)
  reading file 1/3: /tmp/Rtmpycn9qk/hubway_Trips_2012.csv
  reading file 2/3: /tmp/Rtmpycn9qk/201701-hubway-tripdata.csv
  reading file 3/3: /tmp/Rtmpycn9qk/201801_hubway_tripdata.csv
  reading file 1/1: /tmp/Rtmpycn9qk/Divvy_Trips_sample.csv
  reading file 1/1: /tmp/Rtmpycn9qk/2017Q1-capitalbikeshare-tripdata-temp.csv
  reading file 1/1: /tmp/Rtmpycn9qk/la_metro_gbfs_trips_Q1_2017.csv
  reading file 1/1: /tmp/Rtmpycn9qk/01aJourneyDataExtract10Jan16-23Jan16.csv
  reading file 1/1: /tmp/Rtmpycn9qk/Nice_Ride_trip_history_2012_season.csv
  reading file 1/1: /tmp/Rtmpycn9qk/201612-citibike-tripdata.csv
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 91 SKIPPED: 3 FAILED: 6
  1. Error: latest files (@test-db-stats.R#29) 
  2. Error: db stats (@test-db-stats.R#41) 
  3. Error: dl_bikedata nyc (@test-download-data.R#39) 
  4. Error: dl_bikedata dc (@test-download-data.R#54) 
  5. Error: dl_bikedata boston (@test-download-data.R#69) 
  6. Error: dl_bikedata chicago (@test-download-data.R#99) 
  
  Error: testthat unit tests failed
  Execution halted