Running 'testthat.R' [303s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("httr")
  Loading required package: httr
  -- 1. Error: NULL body gives empty data element (@test-body.r#11)  -------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = NULL) at testthat/test-body.r:11
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 2. Error: FALSE body doesn't send body (@test-body.r#16)  -------------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = FALSE) at testthat/test-body.r:16
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 3. Error: string/raw in body gives same string in data element (@test-body.r#
  Timeout was reached: Connection timed out after 10016 milliseconds
  1: round_trip(body = "test") at testthat/test-body.r:21
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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: string/raw in body doesn't lose content type (@test-body.r#31)  ---
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: content(POST("http://httpbin.org/post", body = body, add_headers(`Content-Type` = content_type))) at testthat/test-body.r:31
  2: stopifnot(is.response(x))
  3: 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
     })
  4: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 5. Error: empty list gives empty body (@test-body.r#37)  --------------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: round_trip(body = list(), encode = "form") at testthat/test-body.r:37
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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: named list matches form results (encode = 'form') (@test-body.r#45)
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = list(a = 1, b = 2), encode = "form") at testthat/test-body.r:45
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 7. Error: named list matches form results (encode = 'multipart') (@test-body.
  Timeout was reached: Connection timed out after 10016 milliseconds
  1: round_trip(body = list(a = 1, b = 2), encode = "multipart") at testthat/test-body.r:51
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 8. Error: named list matches form results (encode = 'json') (@test-body.r#57)
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = list(a = 1, b = 2), encode = "json") at testthat/test-body.r:57
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 9. Error: can do own encoding (@test-body.r#63)  ----------------------------
  Timeout was reached: Connection timed out after 10016 milliseconds
  1: round_trip(body = "{\"a\":1,\"b\":2}", content_type_json(), encode = "raw") at testthat/test-body.r:63
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 10. Error: NULL elements are automatically dropped (@test-body.r#68)  -------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = list(x = 1, y = NULL), encode = "form") at testthat/test-body.r:68
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 11. Error: file and form vals mixed give form and data elements (@test-body.r
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = list(y = data_path, a = 1)) at testthat/test-body.r:76
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 12. Error: single file matches contents on disk (@test-body.r#82)  ----------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: round_trip(body = data_path) at testthat/test-body.r:82
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 13. Error: explicit content type overrides defaults (@test-body.r#88)  ------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: round_trip(body = jsonlite::toJSON(list(a = 1, b = 2)), content_type_json()) at testthat/test-body.r:88
  2: content(POST("http://httpbin.org/post", ...)) at testthat/test-body.r:4
  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)
  
  -- 14. Error: basic authentication works (@test-config.r#8)  -------------------
  Timeout was reached: Connection timed out after 10016 milliseconds
  1: GET(path = path, handle = h) at testthat/test-config.r:8
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 15. Error: digest authentication works (@test-config.r#24)  -----------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: GET(path = path, handle = h) at testthat/test-config.r:24
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 16. Error: parse content is null if no body (@test-content.R#4)  ------------
  Timeout was reached: Connection timed out after 10016 milliseconds
  1: content(HEAD("http://httpbin.org/headers")) at testthat/test-content.R:4
  2: stopifnot(is.response(x))
  3: 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
     })
  4: tryCatch(if (missE) ...elt(i) else eval(cl.i, envir = envir), error = function(e) {
         e$call <- cl.i
         stop(e)
     })
  5: tryCatchList(expr, classes, parentenv, handlers)
  6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  7: value[[3L]](cond)
  
  -- 17. Error: POST result with empty body doesn't have content (@test-content.R#
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: POST("http://httpbin.org/post", body = FALSE) at testthat/test-content.R:12
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 18. Error: HEAD requests don't have body (@test-content.R#17)  --------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: HEAD("http://httpbin.org/headers") at testthat/test-content.R:17
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 19. Error: regular POST does have content (@test-content.R#22)  -------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: POST("http://httpbin.org/post") at testthat/test-content.R:22
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 20. Error: All headers captures headers from redirects (@test-header.r#17)  -
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: GET("http://httpbin.org/redirect/1") at testthat/test-header.r:17
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 21. Error: http_error works with urls (@test-http-error.R#4)  ---------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: expect_false(http_error("http://httpbin.org/status/200")) at testthat/test-http-error.R:4
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: http_error("http://httpbin.org/status/200")
  5: http_error.character("http://httpbin.org/status/200")
  6: http_error(HEAD(x, ...))
  7: HEAD(x, ...)
  8: request_perform(req, hu$handle$handle)
  9: request_fetch(req$output, req$url, handle)
  10: request_fetch.write_memory(req$output, req$url, handle)
  11: curl::curl_fetch_memory(url, handle = handle)
  
  -- 22. Error: http_error works with responses (@test-http-error.R#9)  ----------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: GET("http://httpbin.org/status/200") at testthat/test-http-error.R:9
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 23. Error: oauth2.0 signing works (@test-oauth.R#13)  -----------------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: GET(request_url, config(token = token)) at testthat/test-oauth.R:13
  2: request_perform(req, hu$handle$handle)
  3: request_fetch(req$output, req$url, handle)
  4: request_fetch.write_memory(req$output, req$url, handle)
  5: curl::curl_fetch_memory(url, handle = handle)
  
  -- 24. Error: status codes returned as expected (@test-response.r#6)  ----------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: expect_equal(GET("http://httpbin.org/status/320")$status_code, 320) at testthat/test-response.r:6
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: GET("http://httpbin.org/status/320")
  5: request_perform(req, hu$handle$handle)
  6: request_fetch(req$output, req$url, handle)
  7: request_fetch.write_memory(req$output, req$url, handle)
  8: curl::curl_fetch_memory(url, handle = handle)
  
  -- 25. Error: DELETE deletes (@test-response.r#13)  ----------------------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: expect_equal(GET("http://httpbin.org/delete")$status_code, 405) at testthat/test-response.r:13
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: GET("http://httpbin.org/delete")
  5: request_perform(req, hu$handle$handle)
  6: request_fetch(req$output, req$url, handle)
  7: request_fetch.write_memory(req$output, req$url, handle)
  8: curl::curl_fetch_memory(url, handle = handle)
  
  -- 26. Error: POST posts (@test-response.r#18)  --------------------------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: expect_equal(GET("http://httpbin.org/post")$status_code, 405) at testthat/test-response.r:18
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: GET("http://httpbin.org/post")
  5: request_perform(req, hu$handle$handle)
  6: request_fetch(req$output, req$url, handle)
  7: request_fetch.write_memory(req$output, req$url, handle)
  8: curl::curl_fetch_memory(url, handle = handle)
  
  -- 27. Error: PATCH patches (@test-response.r#23)  -----------------------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: expect_equal(GET("http://httpbin.org/patch")$status_code, 405) at testthat/test-response.r:23
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: GET("http://httpbin.org/patch")
  5: request_perform(req, hu$handle$handle)
  6: request_fetch(req$output, req$url, handle)
  7: request_fetch.write_memory(req$output, req$url, handle)
  8: curl::curl_fetch_memory(url, handle = handle)
  
  -- 28. Error: PUT puts (@test-response.r#28)  ----------------------------------
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: expect_equal(GET("http://httpbin.org/put")$status_code, 405) at testthat/test-response.r:28
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: GET("http://httpbin.org/put")
  5: request_perform(req, hu$handle$handle)
  6: request_fetch(req$output, req$url, handle)
  7: request_fetch.write_memory(req$output, req$url, handle)
  8: curl::curl_fetch_memory(url, handle = handle)
  
  -- 29. Error: headers returned as expected (@test-response.r#40)  --------------
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: expect_equal(round_trip(a = 1)$a, "1") at testthat/test-response.r:40
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: round_trip(a = 1)
  5: GET("http://httpbin.org/headers", add_headers(...)) at testthat/test-response.r:34
  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)
  
  -- 30. Error: application/json responses parsed as lists (@test-response.r#55)  
  Timeout was reached: Connection timed out after 10015 milliseconds
  1: test_user_agent() at testthat/test-response.r:55
  2: GET("http://httpbin.org/user-agent", add_headers(`user-agent` = user_agent)) at testthat/test-response.r:47
  3: request_perform(req, hu$handle$handle)
  4: request_fetch(req$output, req$url, handle)
  5: request_fetch.write_memory(req$output, req$url, handle)
  6: curl::curl_fetch_memory(url, handle = handle)
  
  == testthat results  ===========================================================
  OK: 82 SKIPPED: 2 FAILED: 30
  1. Error: NULL body gives empty data element (@test-body.r#11) 
  2. Error: FALSE body doesn't send body (@test-body.r#16) 
  3. Error: string/raw in body gives same string in data element (@test-body.r#21) 
  4. Error: string/raw in body doesn't lose content type (@test-body.r#31) 
  5. Error: empty list gives empty body (@test-body.r#37) 
  6. Error: named list matches form results (encode = 'form') (@test-body.r#45) 
  7. Error: named list matches form results (encode = 'multipart') (@test-body.r#51) 
  8. Error: named list matches form results (encode = 'json') (@test-body.r#57) 
  9. Error: can do own encoding (@test-body.r#63) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted