Running 'testthat.R' [109s]
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/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(CodelistGenerator)
  > 
  > test_check("CodelistGenerator")
  Starting 2 test processes
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 346 ]
  
  ══ Skipped tests (11) ══════════════════════════════════════════════════════════
  • On CRAN (4): 'test-summariseCodeUse.R:2:1', 'test-summariseCodeUse.R:293:3',
    'test-summariseOrphanCodes.R:81:3', 'test-getCandidateCodes.R:310:3'
  • Sys.getenv("CDM5_REDSHIFT_DBNAME") == "" is TRUE (4):
    'test-codesFrom.R:100:3', 'test-dbms.R:5:3', 'test-findUnmappedCodes.R:3:3',
    'test-summariseCodeUse.R:490:3'
  • Sys.getenv("CDM5_SQL_SERVER_SERVER") == "" is TRUE (1):
    'test-codesInUse.R:36:3'
  • Sys.getenv("SNOWFLAKE_SERVER") == "" is TRUE (1): 'test-dbms.R:143:3'
  • Sys.getenv("darwinDbDatabaseServer") == "" is TRUE (1):
    'test-synthea_sql_server.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-tableCodeUse.R:238:3'): table code use output formats ──────────
  Error in `dplyr::collect(removeClass(x, "cdm_table"))`: Failed to collect lazy table.
  Caused by error:
  ! rapi_execute: Failed to run query
  Error: Out of Memory Error: Failed to allocate block of 1048576 bytes (bad allocation)
  Backtrace:
       ▆
    1. ├─CodelistGenerator::summariseCodeUse(...) at test-tableCodeUse.R:238:3
    2. │ └─CodelistGenerator:::getCodeUse(...)
    3. │   └─CodelistGenerator:::getSummaryCounts(...)
    4. │     ├─dplyr::bind_rows(...)
    5. │     │ └─rlang::list2(...)
    6. │     └─CodelistGenerator:::getGroupedPersonCount(...)
    7. │       ├─... %>% dplyr::mutate(estimate_name = "person_count")
    8. │       ├─dplyr::bind_rows(...)
    9. │       │ └─rlang::list2(...)
   10. │       └─... %>% dplyr::collect()
   11. ├─dplyr::mutate(., estimate_name = "person_count")
   12. ├─visOmopResults::uniteStrata(., cols = groupBy)
   13. │ └─visOmopResults::uniteNameLevel(...)
   14. │   └─visOmopResults:::assertTibble(x, columns = cols)
   15. │     └─visOmopResults:::assertNull(x, null, errorMessage, call)
   16. ├─dplyr::collect(.)
   17. ├─omopgenerics:::collect.cdm_table(.)
   18. │ ├─dplyr::collect(removeClass(x, "cdm_table"))
   19. │ └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   20. │   ├─base::withCallingHandlers(...)
   21. │   ├─dbplyr::db_collect(...)
   22. │   └─dbplyr:::db_collect.DBIConnection(...)
   23. │     ├─DBI::dbSendQuery(con, sql)
   24. │     └─duckdb::dbSendQuery(con, sql)
   25. │       └─duckdb (local) .local(conn, statement, ...)
   26. │         └─duckdb:::duckdb_result(...)
   27. │           └─duckdb:::duckdb_execute(res)
   28. │             └─duckdb:::rapi_execute(...)
   29. └─base::.handleSimpleError(...)
   30.   └─dbplyr (local) h(simpleError(msg, call))
   31.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   32.       └─rlang::abort(...)
  
  [ FAIL 1 | WARN 0 | SKIP 11 | PASS 346 ]
  Error: Test failures
  Execution halted