Running ‘testthat.R’ [34s/84s]
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 10001 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 10001 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 10001 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 la (@test-download-data.R#88)  ────────────────────────
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_message(dl_bikedata(city = "la", data_dir = tempdir(), dates = 2016), "All data files already exist") at testthat/test-download-data.R:88
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: dl_bikedata(city = "la", data_dir = tempdir(), dates = 2016)
  7: get_bike_files(city)
  8: get_nabsa_files(city = city)
  9: httr::content(httr::GET(the_url), encoding = "UTF-8", as = "parsed")
  10: stopifnot(is.response(x))
  11: 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
     })
  12: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  ── 7. Error: dl_bikedata chicago (@test-download-data.R#99)  ───────────────────
  Timeout was reached: Resolving timed out after 10000 milliseconds
  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/Rtmp6jijJP/Divvy_Trips_sample/ (stored 0%)
    adding: tmp/Rtmp6jijJP/Divvy_Trips_sample/Divvy_Trips_sample.csv (deflated 79%)
    adding: tmp/Rtmp6jijJP/Divvy_Trips_sample/Divvy_Stations.csv (deflated 68%)
    adding: tmp/Rtmp6jijJP/201701-hubway-tripdata.csv (deflated 81%)
    adding: tmp/Rtmp6jijJP/201801_hubway_tripdata.csv (deflated 81%)
    adding: tmp/Rtmp6jijJP/Nice_Ride_data_2012_season/ (stored 0%)
    adding: tmp/Rtmp6jijJP/Nice_Ride_data_2012_season/Nice_Ride_trip_history_2012_season.csv (deflated 81%)
    adding: tmp/Rtmp6jijJP/Nice_Ride_data_2012_season/Nice_Ride_2012-station_locations .csv (deflated 62%)
    adding: tmp/Rtmp6jijJP/2017Q1-capitalbikeshare-tripdata-temp.csv (deflated 80%)
    adding: tmp/Rtmp6jijJP/la_metro_gbfs_trips_Q1_2017.csv (deflated 85%)
    adding: tmp/Rtmp6jijJP/201612-citibike-tripdata.csv (deflated 74%)
  ── 8. Error: write and store data (@test-store-data.R#44)  ─────────────────────
  zip file '/tmp/Rtmp6jijJP/MetroBikeShare_2016_Q3_trips.zip' cannot be opened
  1: expect_silent(n <- store_bikedata(data_dir = tempdir(), bikedb = bikedb, quiet = TRUE)) at testthat/test-store-data.R:44
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: store_bikedata(data_dir = tempdir(), bikedb = bikedb, quiet = TRUE)
  10: bike_unzip_files(data_dir, bikedb, ci, dates)
  11: unzip(f, list = TRUE)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 84 SKIPPED: 3 FAILED: 8
  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 la (@test-download-data.R#88) 
  7. Error: dl_bikedata chicago (@test-download-data.R#99) 
  8. Error: write and store data (@test-store-data.R#44) 
  
  Error: testthat unit tests failed
  Execution halted