Running ‘testthat.R’ [24s/49s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(BIOMASS)
  > 
  > test_check("BIOMASS")
  
    |                                                                            
    |                                                                      |   0%── 1. Error: CorrectTaxo (@test_00_correctTaxo.R#72)  ──────────────────────────
  Timeout was reached: Resolving timed out after 10000 milliseconds
  1: expect_equal(correctTaxo(genus = "bvgaeuigareuiguei", useCache = NULL), data.frame(genusCorrected = "bvgaeuigareuiguei", 
         speciesCorrected = NA_character_, nameModified = "TaxaNotFound", stringsAsFactors = F)) at testthat/test_00_correctTaxo.R:72
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: correctTaxo(genus = "bvgaeuigareuiguei", useCache = NULL)
  5: rbindlist(lapply(slices, function(slice) {
         baseURL <- "http://taxosaurus.org/submit"
         qryResult <- httr::POST(baseURL, httr::config(followlocation = 0), body = list(query = paste(slice$query, 
             collapse = "\n"), source = "iPlant_TNRS"))
         if (httr::http_error(qryResult)) {
             httr::stop_for_status(qryResult, "connect to taxosaurus service. Retry maybe later")
         }
         retrieveURL <- qryResult$headers$location
         repeat {
             Sys.sleep(WAIT_DELAY)
             qryResult <- httr::GET(retrieveURL)
             if (httr::status_code(qryResult) != 302) {
                 break
             }
         }
         if (httr::http_error(qryResult)) {
             httr::stop_for_status(qryResult, "get answer from taxosaurus service. Retry maybe later")
         }
         answer <- jsonlite::fromJSON(httr::content(qryResult, "text", encoding = "UTF-8"), 
             FALSE)
         if (length(answer$names)) {
             flatten <- function(match) {
                 match$annotations <- paste(sprintf("%s(%s)", names(match$annotations), 
                     match$annotations), collapse = ", ")
                 match$score <- as.numeric(match$score)
                 match
             }
             result <- rbindlist(lapply(answer$names, function(name) c(submittedName = name$submittedName, 
                 flatten(name$matches[[1]]), from = "taxosaurus")))
         }
         else {
             result <- data.table(submittedName = character(0), score = numeric(0), matchedName = character(0), 
                 from = character(0), acceptedName = character(0))
         }
         result <- result[slice[, .(query)], on = c(submittedName = "query"), nomatch = NA]
         result[is.na(from), `:=`(score = 1, matchedName = NA_character_, from = "taxosaurus(not_found)")]
         if (verbose) {
             utils::setTxtProgressBar(pb, slice$slice[1]/length(slices))
         }
         result
     }))
  6: lapply(slices, function(slice) {
         baseURL <- "http://taxosaurus.org/submit"
         qryResult <- httr::POST(baseURL, httr::config(followlocation = 0), body = list(query = paste(slice$query, 
             collapse = "\n"), source = "iPlant_TNRS"))
         if (httr::http_error(qryResult)) {
             httr::stop_for_status(qryResult, "connect to taxosaurus service. Retry maybe later")
         }
         retrieveURL <- qryResult$headers$location
         repeat {
             Sys.sleep(WAIT_DELAY)
             qryResult <- httr::GET(retrieveURL)
             if (httr::status_code(qryResult) != 302) {
                 break
             }
         }
         if (httr::http_error(qryResult)) {
             httr::stop_for_status(qryResult, "get answer from taxosaurus service. Retry maybe later")
         }
         answer <- jsonlite::fromJSON(httr::content(qryResult, "text", encoding = "UTF-8"), 
             FALSE)
         if (length(answer$names)) {
             flatten <- function(match) {
                 match$annotations <- paste(sprintf("%s(%s)", names(match$annotations), 
                     match$annotations), collapse = ", ")
                 match$score <- as.numeric(match$score)
                 match
             }
             result <- rbindlist(lapply(answer$names, function(name) c(submittedName = name$submittedName, 
                 flatten(name$matches[[1]]), from = "taxosaurus")))
         }
         else {
             result <- data.table(submittedName = character(0), score = numeric(0), matchedName = character(0), 
                 from = character(0), acceptedName = character(0))
         }
         result <- result[slice[, .(query)], on = c(submittedName = "query"), nomatch = NA]
         result[is.na(from), `:=`(score = 1, matchedName = NA_character_, from = "taxosaurus(not_found)")]
         if (verbose) {
             utils::setTxtProgressBar(pb, slice$slice[1]/length(slices))
         }
         result
     })
  7: FUN(X[[i]], ...)
  8: httr::POST(baseURL, httr::config(followlocation = 0), body = list(query = paste(slice$query, 
         collapse = "\n"), source = "iPlant_TNRS"))
  9: request_perform(req, hu$handle$handle)
  10: request_fetch(req$output, req$url, handle)
  11: request_fetch.write_memory(req$output, req$url, handle)
  12: curl::curl_fetch_memory(url, handle = handle)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 495 SKIPPED: 0 FAILED: 1
  1. Error: CorrectTaxo (@test_00_correctTaxo.R#72) 
  
  Error: testthat unit tests failed
  Execution halted