Running ‘testthat.R’ [4s/143s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(biolink)
  > 
  > test_check("biolink")
  ── 1. Error: NCBI Entrez tag retrieval (@test-tags-entrez.r#10)  ───────────────
  HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial
  1: expect_equal(query_entrez(ids, "symbol"), symbols) at testthat/test-tags-entrez.r:10
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: query_entrez(ids, "symbol")
  5: query_ncbi(check_id(id, "entrez"), "gene")
  6: xml2::read_xml(rentrez::entrez_fetch(db, id, rettype = "xml"))
  7: rentrez::entrez_fetch(db, id, rettype = "xml")
  8: do.call(make_entrez_query, args)
  9: (function (util, config, interface = ".fcgi?", by_id = FALSE, ...) 
     {
         uri <- paste0("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/", util, interface)
         args <- list(..., email = entrez_email(), tool = entrez_tool())
         unsent_flag <- TRUE
         if ("id" %in% names(args)) {
             if (by_id) {
                 ids_string <- paste0("id=", args$id, collapse = "&")
                 args$id <- NULL
                 uri <- paste0(uri, ids_string)
             }
             else {
                 args$id <- paste(args$id, collapse = ",")
             }
             if (length(args$id) > 200) {
                 response <- httr::POST(uri, body = args, config = config)
                 unsent_flag <- FALSE
             }
         }
         if (unsent_flag) {
             response <- httr::GET(uri, query = args, config = config)
         }
         entrez_check(response)
         httr::content(response, as = "text", encoding = "UTF-8")
     })("efetch", db = "gene", rettype = "xml", config = NULL, id = c("101954267", "105369219"
     ))
  10: entrez_check(response)
  11: stop("HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial")
  
  ── 2. Error: NCBI Entrez tag substitution (@test-tags-entrez.r#20)  ────────────
  HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial
  1: link_entrez(id, "<symbol>", format = "html") at testthat/test-tags-entrez.r:20
  2: sub_var(text, id, "entrez")
  3: withVisible(`_f`(x = x, id = id, db = db))
  4: `_f`(x = x, id = id, db = db)
  5: query_entrez(id, field)
  6: query_ncbi(check_id(id, "entrez"), "gene")
  7: xml2::read_xml(rentrez::entrez_fetch(db, id, rettype = "xml"))
  8: rentrez::entrez_fetch(db, id, rettype = "xml")
  9: do.call(make_entrez_query, args)
  10: (function (util, config, interface = ".fcgi?", by_id = FALSE, ...) 
     {
         uri <- paste0("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/", util, interface)
         args <- list(..., email = entrez_email(), tool = entrez_tool())
         unsent_flag <- TRUE
         if ("id" %in% names(args)) {
             if (by_id) {
                 ids_string <- paste0("id=", args$id, collapse = "&")
                 args$id <- NULL
                 uri <- paste0(uri, ids_string)
             }
             else {
                 args$id <- paste(args$id, collapse = ",")
             }
             if (length(args$id) > 200) {
                 response <- httr::POST(uri, body = args, config = config)
                 unsent_flag <- FALSE
             }
         }
         if (unsent_flag) {
             response <- httr::GET(uri, query = args, config = config)
         }
         entrez_check(response)
         httr::content(response, as = "text", encoding = "UTF-8")
     })("efetch", db = "gene", rettype = "xml", config = NULL, id = "101954267")
  11: entrez_check(response)
  12: stop("HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial")
  
  ── 3. Error: PubMed tag retrieval (@test-tags-pubmed.r#12)  ────────────────────
  HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial
  1: expect_equal(query_pubmed(ids, "year"), years) at testthat/test-tags-pubmed.r:12
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: query_pubmed(ids, "year")
  5: query_ncbi(check_id(id, "pubmed"), "pubmed")
  6: xml2::read_xml(rentrez::entrez_fetch(db, id, rettype = "xml"))
  7: rentrez::entrez_fetch(db, id, rettype = "xml")
  8: do.call(make_entrez_query, args)
  9: (function (util, config, interface = ".fcgi?", by_id = FALSE, ...) 
     {
         uri <- paste0("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/", util, interface)
         args <- list(..., email = entrez_email(), tool = entrez_tool())
         unsent_flag <- TRUE
         if ("id" %in% names(args)) {
             if (by_id) {
                 ids_string <- paste0("id=", args$id, collapse = "&")
                 args$id <- NULL
                 uri <- paste0(uri, ids_string)
             }
             else {
                 args$id <- paste(args$id, collapse = ",")
             }
             if (length(args$id) > 200) {
                 response <- httr::POST(uri, body = args, config = config)
                 unsent_flag <- FALSE
             }
         }
         if (unsent_flag) {
             response <- httr::GET(uri, query = args, config = config)
         }
         entrez_check(response)
         httr::content(response, as = "text", encoding = "UTF-8")
     })("efetch", db = "pubmed", rettype = "xml", config = NULL, id = c("22066989", "20600793"
     ))
  10: entrez_check(response)
  11: stop("HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial")
  
  ── 4. Error: PubMed tag substitution (@test-tags-pubmed.r#22)  ─────────────────
  HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial
  1: link_pubmed(id, "<year>", format = "html") at testthat/test-tags-pubmed.r:22
  2: sub_var(text, id, "pubmed")
  3: withVisible(`_f`(x = x, id = id, db = db))
  4: `_f`(x = x, id = id, db = db)
  5: query_pubmed(id, field)
  6: query_ncbi(check_id(id, "pubmed"), "pubmed")
  7: xml2::read_xml(rentrez::entrez_fetch(db, id, rettype = "xml"))
  8: rentrez::entrez_fetch(db, id, rettype = "xml")
  9: do.call(make_entrez_query, args)
  10: (function (util, config, interface = ".fcgi?", by_id = FALSE, ...) 
     {
         uri <- paste0("https://eutils.ncbi.nlm.nih.gov/entrez/eutils/", util, interface)
         args <- list(..., email = entrez_email(), tool = entrez_tool())
         unsent_flag <- TRUE
         if ("id" %in% names(args)) {
             if (by_id) {
                 ids_string <- paste0("id=", args$id, collapse = "&")
                 args$id <- NULL
                 uri <- paste0(uri, ids_string)
             }
             else {
                 args$id <- paste(args$id, collapse = ",")
             }
             if (length(args$id) > 200) {
                 response <- httr::POST(uri, body = args, config = config)
                 unsent_flag <- FALSE
             }
         }
         if (unsent_flag) {
             response <- httr::GET(uri, query = args, config = config)
         }
         entrez_check(response)
         httr::content(response, as = "text", encoding = "UTF-8")
     })("efetch", db = "pubmed", rettype = "xml", config = NULL, id = "22066989")
  11: entrez_check(response)
  12: stop("HTTP failure: 502, bad gateway. This error code is often returned when trying to download many records in a single request.  Try using web history as described in the rentrez tutorial")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 108 SKIPPED: 1 FAILED: 4
  1. Error: NCBI Entrez tag retrieval (@test-tags-entrez.r#10) 
  2. Error: NCBI Entrez tag substitution (@test-tags-entrez.r#20) 
  3. Error: PubMed tag retrieval (@test-tags-pubmed.r#12) 
  4. Error: PubMed tag substitution (@test-tags-pubmed.r#22) 
  
  Error: testthat unit tests failed
  Execution halted