Running 'spelling.R' [0s]
  Running 'testthat.R' [170s]
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(CohortCharacteristics)
  > 
  > test_check("CohortCharacteristics")
  Starting 2 test processes
  [ FAIL 4 | WARN 0 | SKIP 11 | PASS 129 ]
  
  ══ Skipped tests (11) ══════════════════════════════════════════════════════════
  • On CRAN (10): 'test-plotCharacteristics.R:2:3',
    'test-plotLargeScaleCharacteristics.R:3:3', 'test-plotSummarised.R:2:3',
    'test-plotSummarised.R:94:3', 'test-plotSummarised.R:203:3',
    'test-plotSummarised.R:308:3',
    'test-summariseLargeScaleCharacteristics.R:2:3',
    'test-tableSummarised.R:2:3', 'test-tableSummarised.R:124:3',
    'test-summariseCharacteristics.R:1122:3'
  • empty test (1): 'test-tableSummarised.R:266:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-summariseCharacteristics.R:377:3'): test empty cohort ──────────
  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 65536 bytes (bad allocation)
  Backtrace:
       ▆
    1. ├─PatientProfiles (local) mockCohortCharacteristics(...) at test-summariseCharacteristics.R:377:3
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─omopgenerics::newCohortTable(...)
    4. │     └─omopgenerics:::validateGeneratedCohortSet(cohort, soft = .softValidation)
    5. │       └─omopgenerics:::cdi(cohort)
    6. │         ├─base::sort(dplyr::pull(dplyr::distinct(dplyr::select(x, "cohort_definition_id"))))
    7. │         ├─dplyr::pull(dplyr::distinct(dplyr::select(x, "cohort_definition_id")))
    8. │         └─dbplyr:::pull.tbl_sql(dplyr::distinct(dplyr::select(x, "cohort_definition_id")))
    9. │           ├─dplyr::collect(.data)
   10. │           └─omopgenerics:::collect.cohort_table(.data)
   11. │             ├─dplyr::collect(attr(x, "cohort_set"))
   12. │             └─omopgenerics:::collect.cdm_table(attr(x, "cohort_set"))
   13. │               ├─dplyr::collect(removeClass(x, "cdm_table"))
   14. │               └─dbplyr:::collect.tbl_sql(removeClass(x, "cdm_table"))
   15. │                 ├─base::withCallingHandlers(...)
   16. │                 ├─dbplyr::db_collect(...)
   17. │                 └─dbplyr:::db_collect.DBIConnection(...)
   18. │                   ├─DBI::dbSendQuery(con, sql)
   19. │                   └─duckdb::dbSendQuery(con, sql)
   20. │                     └─duckdb (local) .local(conn, statement, ...)
   21. │                       └─duckdb:::duckdb_result(...)
   22. │                         └─duckdb:::duckdb_execute(res)
   23. │                           └─duckdb:::rapi_execute(...)
   24. └─base::.handleSimpleError(...)
   25.   └─dbplyr (local) h(simpleError(msg, call))
   26.     └─cli::cli_abort("Failed to collect lazy table.", parent = cnd)
   27.       └─rlang::abort(...)
  ── Failure ('test-summariseCharacteristics.R:1009:3'): arguments cohortIntersect ──
  Expected `... <- NULL` to run without any errors.
  i Actually got a <rlang_error> with text:
    Can't query parent pid.
  ── Failure ('test-summariseCharacteristics.R:1020:3'): arguments cohortIntersect ──
  "Cohort 1 (flag) anytime before" %in% (results %>% dplyr::pull("variable_name")) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-summariseCharacteristics.R:1025:3'): arguments cohortIntersect ──
  ... %>% as.numeric() (`actual`) not identical to 3 (`expected`).
  
    `actual`:  
  `expected`: 3
  
  [ FAIL 4 | WARN 0 | SKIP 11 | PASS 129 ]
  Error: Test failures
  Execution halted