Running ‘testthat.R’ [144s/177s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CodelistGenerator)
  > 
  > test_check("CodelistGenerator")
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 3 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 2 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 3 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding concepts using synonymns
  condition domain: Adding descendants
  v 4 candidate concepts identified
  Time taken: 0 minutes and 6 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  v 1 candidate concept identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  v 2 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 5 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  condition domain: Adding ancestor
  v 4 candidate concepts identified
  Time taken: 0 minutes and 6 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  condition domain: Adding ancestor
  v 2 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 5 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding concepts using synonymns
  condition domain: Adding descendants
  v 4 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 2 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding codes from non-standard
  v 2 candidate concepts identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding codes from non-standard
  v 1 candidate concept identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding concepts using synonymns
  condition domain: Adding descendants
  condition domain: Adding ancestor
  condition domain: Adding codes from non-standard
  v 5 candidate concepts identified
  Time taken: 0 minutes and 7 seconds
  drug domain: Limiting to domains of interest
  drug: Getting concepts to include
  drug domain: Adding concepts using synonymns
  drug domain: Adding ancestor
  v 1 candidate concept identified
  Time taken: 0 minutes and 5 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding concepts using synonymns
  condition domain: Adding descendants
  condition domain: Adding ancestor
  drug domain: Limiting to domains of interest
  drug: Getting concepts to include
  drug domain: Adding concepts using synonymns
  drug domain: Adding descendants
  drug domain: Adding ancestor
  v 7 candidate concepts identified
  Time taken: 0 minutes and 6 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  No codes found for the given search strategy
  Time taken: 0 minutes and 1 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  v 1 candidate concept identified
  Time taken: 0 minutes and 1 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  No codes found for the given search strategy
  Time taken: 0 minutes and 2 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  some other table domain: Limiting to domains of interest
  some other table: Getting concepts to include
  v 3 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  some other table domain: Limiting to domains of interest
  some other table: Getting concepts to include
  No codes found for the given search strategy
  Time taken: 0 minutes and 1 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  observation domain: Limiting to domains of interest
  observation: Getting concepts to include
  v 4 candidate concepts identified
  Time taken: 0 minutes and 3 seconds
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  observation domain: Limiting to domains of interest
  observation: Getting concepts to include
  v 1 candidate concept identified
  Time taken: 0 minutes and 3 seconds
  
  -- No codes found --
  
  i No ICD-10 chapter codes were found in the concept table.
  -- Were ICD-10 codes included when loading vocabularies into the database?
  -- No codes found --
  
  i No ICD-10 chapter codes were found in the concept table.
  -- Were ICD-10 codes included when loading vocabularies into the database?
  condition domain: Limiting to domains of interest
  condition: Getting concepts to include
  condition domain: Adding descendants
  v 5 candidate concepts identified
  Time taken: 0 minutes and 1 seconds
  [ FAIL 9 | WARN 0 | SKIP 5 | PASS 129 ]
  
  ══ Skipped tests (5) ═══════════════════════════════════════════════════════════
  • On CRAN (2): 'test-summariseCodeUse.R:2:1', 'test-summariseCodeUse.R:290:3'
  • Sys.getenv("CDM5_REDSHIFT_DBNAME") == "" is TRUE (2):
    'test-codesFrom.R:100:3', 'test-summariseCodeUse.R:498:3'
  • Sys.getenv("darwinDbDatabaseServer") == "" is TRUE (1):
    'test-synthea_sql_server.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-codesFrom.R:6:5'): test inputs - mock ──────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backends[[i]]) at test-codesFrom.R:6:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-drugCodes.R:5:3'): getATCCodes working ─────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backend = backends[i]) at test-drugCodes.R:5:3
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-drugCodes.R:33:5'): getATCCodes expected errors ────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backend = backends[i]) at test-drugCodes.R:33:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-drugCodes.R:49:5'): getDrugIngredientCodes working ─────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backend = backends[i]) at test-drugCodes.R:49:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-drugCodes.R:84:5'): getDrugIngredientCodes expected errors ─────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backend = backends[i]) at test-drugCodes.R:84:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-getCandidateCodes.R:6:5'): tests with mock db ──────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backends[[i]]) at test-getCandidateCodes.R:6:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-getICD10StandardCodes.R:4:5'): db without icd10 codes loaded ───
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backend = backends[i]) at test-getICD10StandardCodes.R:4:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-mockVocabRef.R:3:3'): mock vocab db ────────────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef("data_frame") at test-mockVocabRef.R:3:3
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  ── Error ('test-vocabUtilities.R:6:5'): tests with mock db ─────────────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `map2(.x, .y, .f, ..., .progress = .progress)`: i In index: 1.
  i With name: cdm_source.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'arrow'
  Backtrace:
       ▆
    1. ├─CodelistGenerator::mockVocabRef(backends[[i]]) at test-vocabUtilities.R:6:5
    2. │ └─CDMConnector::stow(cdm, dOut)
    3. │   └─purrr::walk2(...)
    4. │     └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
    5. │       └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
    6. │         ├─purrr:::with_indexed_errors(...)
    7. │         │ └─base::withCallingHandlers(...)
    8. │         ├─purrr:::call_with_cleanup(...)
    9. │         └─CDMConnector (local) .f(.x[[i]], .y[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   13. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   14. │ └─base::stop(cond)
   15. └─purrr (local) `<fn>`(`<pckgNtFE>`)
   16.   └─cli::cli_abort(...)
   17.     └─rlang::abort(...)
  
  [ FAIL 9 | WARN 0 | SKIP 5 | PASS 129 ]
  Error: Test failures
  In addition: There were 14 warnings (use warnings() to see them)
  Execution halted
  Warning messages:
  1: Connection is garbage-collected, use dbDisconnect() to avoid this. 
  2: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. 
  3: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. 
  4: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. 
  5: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. 
  6: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this.