Running 'testthat.R' [254s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(PubChemR)
  > 
  > # Functions used globally in package tests (testthat) ----
  > allSuccess <- function(object){
  +   all(unlist(lapply(object$result, "[[", "success")))
  + }
  > 
  > testRequest <- function(object, ...){
  +   test_that(paste0("pulling via '", request_args(object, "namespace"), "' is succesfull"), {
  +     expect_true(allSuccess(object))
  +   })
  + 
  +   test_that("prints output to the R Console", {
  +     expect_output(print(object))
  +   })
  + }
  > 
  > # Set 'skipTests' FALSE to run test codes. This is set TRUE to skip
  > # all tests on GitHub actions since some of PubChem requests were incomplete due to
  > # timeout and/or API related issues. BUILD & CHECK actions on GitHub returns error
  > # even if all tests were passed on local installations of R.
  > skipTests <- FALSE
  > 
  > if (!skipTests){
  +   test_check("PubChemR")
  + }
  Error in get_pubchem(identifier, namespace, domain, operation, outformat,  : 
    c(Code = "PUGREST.ServerBusy", Message = "Too many requests or server too busy")
  Error in get_pubchem(identifier, namespace, domain, operation, outformat,  : 
    c(Code = "PUGREST.ServerBusy", Message = "Too many requests or server too busy")
  Error in get_pubchem(identifier, namespace, domain, operation, outformat,  : 
    c(Code = "PUGREST.ServerBusy", Message = "Too many requests or server too busy")
  Error in get_pubchem(identifier, namespace, domain, operation, outformat,  : 
    c(Code = "PUGREST.ServerBusy", Message = "Too many requests or server too busy")
  Error in file(con, "r") : cannot open the connection
  Request failed [503]. Retrying in 2.9 seconds...
  Request failed [503]. Retrying in 7.5 seconds...
  Request failed [503]. Retrying in 1 seconds...
  Request failed [503]. Retrying in 6.4 seconds...
  Request failed [400]. Retrying in 3.2 seconds...
  Request failed [503]. Retrying in 1 seconds...
  Request failed [503]. Retrying in 2.7 seconds...
  Request failed [504]. Retrying in 7.6 seconds...
  Request failed [504]. Retrying in 2.1 seconds...
  Request failed [504]. Retrying in 4.5 seconds...
  Request failed [503]. Retrying in 1 seconds...
  Request failed [503]. Retrying in 1 seconds...
  Request failed [503]. Retrying in 1 seconds...
  Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
  Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
  'path' is not specified. Saving files into a temporary folder.
  Error: Received no content to write to the SDF file. URL may be invalid or the content is missing.
  [ FAIL 35 | WARN 47 | SKIP 0 | PASS 135 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-download.R:51:5'): overwrite file if it already exists. ──────
  identical(ctime, mtime) is not FALSE
  
  `actual`:   TRUE 
  `expected`: FALSE
  ── Failure ('test-download.R:119:3'): create 'path' if it does not exist. ──────
  all(file.exists(json_file), file.exists(sdf_file)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_assays.R:5:1'): pulling via 'aid' is succesfull ──────────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_assays.R:42:3'): retrieve() returns selected slots as expected for an assay ──
  {
      ...
  } is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_assays.R:61:3'): checking the effect of '.verbose' argument in retrieve() function ──
  `retrieve(assay, .slot = "comment", .verbose = TRUE)` produced no output
  ── Failure ('test-get_assays.R:62:3'): checking the effect of '.verbose' argument in retrieve() function ──
  retrieve(assay, .slot = "comment", .verbose = TRUE, .combine.all = TRUE) returns visibly, not invisibly.
  ── Failure ('test-get_cids.R:20:5'): pulling cids via 'name' is succesfull ─────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_cids.R:20:5'): pulling cids via 'smiles' is succesfull ───
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_cids.R:47:3'): pulling cids for multiple identifiers with undefined input. ──
  cids$result[[1]]$success is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_properties.R:12:1'): pulling via 'cid' is succesfull ─────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_properties.R:24:3'): all requested properties returned successfully. ──
  all(propNamesRequested %in% propNamesReturned) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_properties.R:38:3'): .slot vector of length >1 returns warning and accepts the first element in .slot ──
  (all(is.data.frame(tmp), nrow(tmp) == 1, ncol(tmp) == 2)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:3:3'): pubChemData() works properly ───────────
  is.array(pubChemData(tmp)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:28:3'): tests for SDF output successful ───────
  {
      ...
  } is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:32:3'): tests for SDF output successful ───────
  all(is.list(pubChemData(tmp)), length(pubChemData(tmp)) == 0) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:35:3'): tests for SDF output successful ───────
  file.exists(file.path(tmp2$fileDetails$Path, tmp2$fileDetails$Name)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:50:3'): test for PNG output successful ────────
  all(tmp$success, is.array(tmp$result)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:51:3'): test for PNG output successful ────────
  all(tmp2$success, is.array(tmp$result)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_pug_rest.R:53:3'): test for PNG output successful ────────
  {
      ...
  } is not TRUE
  
  `actual`:       
  `expected`: TRUE
  ── Error ('test-get_sdf.R:14:3'): pulling SDFs via 'name' is succesful ─────────
  Error in `file.exists(tmp)`: invalid 'file' argument
  Backtrace:
      ▆
   1. ├─testthat::expect_true(file.exists(tmp)) at test-get_sdf.R:14:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::file.exists(tmp)
  ── Failure ('test-get_sdf.R:30:3'): pulling SDFs via 'cid' is succesful ────────
  file.exists(file.path(temp_dir, "file.sdf")) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_sdf.R:60:3'): save SDF files to temporary working directory when path is not specified. ──
  file.exists(file.path(default_path, "file.sdf")) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_sids.R:20:5'): pulling sids via 'name' is succesfull ─────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_sids.R:20:5'): pulling sids via 'cid' is succesfull ──────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_sids.R:20:5'): pulling sids via 'smiles' is succesfull ───
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_sids.R:53:3'): pulling sids for multiple identifiers with undefined input. ──
  sids$result[[1]]$success is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_substances.R:6:1'): pulling via 'name' is succesfull ─────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_substances.R:30:3'): incorrect/undefined substance identifier returns error ──
  all(!is.null(tmp$result[[1]]$error), is.list(tmp$result[[1]]$error)) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_substances.R:35:3'): '.verbose' works as expected ────────
  retrieve(...) returns visibly, not invisibly.
  ── Failure ('test-get_substances.R:38:3'): '.verbose' works as expected ────────
  retrieve(...) returns visibly, not invisibly.
  ── Failure ('test-get_substances.R:50:3'): return error for unavailable substance idx. ──
  `retrieve(tmp, .slot = "comment", .to.data.frame = TRUE, .idx = 66666)` did not throw the expected error.
  ── Failure ('test-get_synonyms.R:6:1'): pulling via 'name' is succesfull ───────
  allSuccess(object) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_synonyms.R:10:3'): synonyms returns list or data.frame correctly ──
  {
      ...
  } is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_synonyms.R:41:3'): pulling synonyms via 'name' is succesful ──
  allSuccess(tmp) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-get_synonyms.R:50:3'): pulling synonyms via 'cid' is succesful ──
  allSuccess(tmp) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 35 | WARN 47 | SKIP 0 | PASS 135 ]
  Error: Test failures
  Execution halted