Running 'testthat.R' [2s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(osrmr)
  > 
  > test_check("osrmr")
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  Error in file(con, "r") : cannot open the connection
  -- 1. Error: viaroute finds routes (@test-basic_functions.R#15)  ---------------
  reached elapsed time limit
  1: expect_equal(viaroute(lat1, lng1, lat2, lng2, F, api_version, localhost), 1560, tolerance = 300, 
         scale = 1) at testthat/test-basic_functions.R:15
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: viaroute(lat1, lng1, lat2, lng2, F, api_version, localhost)
  5: viaroute_api_v5(lat1, lng1, lat2, lng2, instructions, address)
  6: R.utils::withTimeout({
         repeat {
             res <- try(route <- rjson::fromJSON(file = paste(address, "/route/v1/driving/", 
                 lng1, ",", lat1, ";", lng2, ",", lat2, "?overview=false", sep = "", NULL)))
             if (class(res) != "try-error") {
                 if (!is.null(res)) {
                     break
                 }
                 else {
                     stop("in sim911::osrm_viaroute: calculate nearest necessary?")
                 }
             }
         }
     }, timeout = 1, onTimeout = "warning")
  7: tryCatch({
         eval(expr, envir = envir)
     }, error = function(ex) {
         msg <- ex$message
         pattern <- gettext("reached elapsed time limit", "reached CPU time limit", domain = "R")
         pattern <- paste(pattern, collapse = "|")
         if (regexpr(pattern, msg) != -1L) {
             ex <- TimeoutException(msg, cpu = cpu, elapsed = elapsed)
             if (onTimeout == "error") {
                 throw(ex)
             }
             else if (onTimeout == "warning") {
                 warning(getMessage(ex))
             }
             else if (onTimeout == "silent") {
             }
         }
         else {
             throw(ex)
         }
     })
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: doTryCatch(return(expr), name, parentenv, handler)
  ...
  23: withRestarts({
         .Internal(.signalCondition(simpleWarning(msg, call), msg, call))
         .Internal(.dfltWarn(msg, call))
     }, muffleWarning = function() NULL)
  24: withOneRestart(expr, restarts[[1L]])
  25: doWithOneRestart(return(expr), restart)
  26: (function (e) 
     {
         handled <<- TRUE
         e$expectation_calls <- frame_calls(11, 5)
         register_expectation(e)
         invokeRestart("muffleWarning")
     })(structure(list(message = "cannot open URL 'http://router.project-osrm.org/route/v1/driving/8.117,47.168;8.335,46.978?overview=false': HTTP status was '429 ???'", 
         call = file(con, "r")), class = c("simpleWarning", "warning", "condition")))
  27: register_expectation(e)
  28: get_reporter()$add_result(context = get_reporter()$.context, test = test, result = e)
  29: o_apply(self$reporters, "add_result", context = context, test = test, result = result)
  30: lapply(objects, function(x) x[[method]](...))
  31: FUN(X[[i]], ...)
  32: x[[method]](...)
  
  == testthat results  ===========================================================
  OK: 15 SKIPPED: 1 FAILED: 1
  1. Error: viaroute finds routes (@test-basic_functions.R#15) 
  
  Error: testthat unit tests failed
  Execution halted