Running ‘testthat.R’ [12m/13m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gutenbergr)
  > 
  > test_check("gutenbergr")
  ── 1. Error: gutenberg_get_mirror works (@test-download.R#8)  ──────────────────
  Timeout was reached: Connection timed out after 10000 milliseconds
  1: gutenberg_get_mirror() at testthat/test-download.R:8
  2: readr::read_lines(wget_url)
  3: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  4: datasource_connection(file, skip, skip_empty_rows, comment)
  5: read_connection(path)
  6: open(con, "rb")
  7: open.connection(con, "rb")
  
  ── 2. Error: Can download Charles Dickens' Christmas Carol and Jane Austen's Per
  Failed to connect to www.gutenberg.org port 80: Connection timed out
  1: gutenberg_download(c(46, 105), meta_fields = c("title", "author")) at testthat/test-download.R:19
  2: gutenberg_get_mirror(verbose = verbose)
  3: readr::read_lines(wget_url)
  4: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  5: datasource_connection(file, skip, skip_empty_rows, comment)
  6: read_connection(path)
  7: open(con, "rb")
  8: open.connection(con, "rb")
  
  ── 3. Error: Can download books from a data frame with gutenberg_id column (@tes
  Failed to connect to www.gutenberg.org port 80: Connection timed out
  1: gutenberg_works(title == "The United States Constitution") %>% gutenberg_download() at testthat/test-download.R:40
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: gutenberg_download(.)
  10: gutenberg_get_mirror(verbose = verbose)
  11: readr::read_lines(wget_url)
  12: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  13: datasource_connection(file, skip, skip_empty_rows, comment)
  14: read_connection(path)
  15: open(con, "rb")
  16: open.connection(con, "rb")
  
  ── 4. Error: We can download a file that only has a -8 version (@test-download.R
  Timeout was reached: Connection timed out after 10010 milliseconds
  1: gutenberg_download(8438) at testthat/test-download.R:49
  2: gutenberg_get_mirror(verbose = verbose)
  3: readr::read_lines(wget_url)
  4: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  5: datasource_connection(file, skip, skip_empty_rows, comment)
  6: read_connection(path)
  7: open(con, "rb")
  8: open.connection(con, "rb")
  
  ── 5. Error: Trying to download a non-existent book raises a warning (@test-down
  Failed to connect to www.gutenberg.org port 80: Connection timed out
  1: expect_warning(d <- gutenberg_download(c(5, 1e+06)), "Could not download") at testthat/test-download.R:55
  2: quasi_capture(enquo(object), label, capture_warnings)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(.quo), get_env(.quo))
  6: gutenberg_download(c(5, 1e+06))
  7: gutenberg_get_mirror(verbose = verbose)
  8: readr::read_lines(wget_url)
  9: datasource(file, skip = skip, skip_empty_rows = skip_empty_rows)
  10: datasource_connection(file, skip, skip_empty_rows, comment)
  11: read_connection(path)
  12: open(con, "rb")
  13: open.connection(con, "rb")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 29 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 5 ]
  1. Error: gutenberg_get_mirror works (@test-download.R#8) 
  2. Error: Can download Charles Dickens' Christmas Carol and Jane Austen's Persuasion (@test-download.R#19) 
  3. Error: Can download books from a data frame with gutenberg_id column (@test-download.R#40) 
  4. Error: We can download a file that only has a -8 version (@test-download.R#49) 
  5. Error: Trying to download a non-existent book raises a warning (@test-download.R#55) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: In for (i in seq_along(dots)) { :
    closing unused connection 5 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  2: In for (i in seq_along(dots)) { :
    closing unused connection 4 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  3: In for (i in seq_len(n)) { :
    closing unused connection 6 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  4: In for (i in seq_len(n)) { :
    closing unused connection 5 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  5: In for (i in seq_len(n)) { :
    closing unused connection 4 (http://www.gutenberg.org/robot/harvest?filetypes[]=txt)
  Execution halted