Running ‘testthat.R’ [172s/113s]
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(DrugUtilisation)
  > 
  > test_check("DrugUtilisation")
  Starting 2 test processes
  [ FAIL 1 | WARN 88 | SKIP 50 | PASS 61 ]
  
  ══ Skipped tests (50) ══════════════════════════════════════════════════════════
  • On CRAN (50): 'test-addDrugUtilisation.R:3:3',
    'test-addDrugUtilisation.R:156:3', 'test-addDrugUtilisation.R:196:3',
    'test-dailyDose.R:2:3', 'test-benchmarkDrugUtilisation.R:2:3',
    'test-generateDrugUtilisationCohortSet.R:2:3',
    'test-generateDrugUtilisationCohortSet.R:23:3',
    'test-generatedAtcCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:39:3',
    'test-generatedIngredientCohortSet.R:54:3',
    'test-generatedIngredientCohortSet.R:69:3',
    'test-generatedIngredientCohortSet.R:98:3', 'test-drugUse.R:2:3',
    'test-drugUse.R:42:3', 'test-drugUse.R:259:3', 'test-drugUse.R:463:3',
    'test-drugUse.R:608:3', 'test-drugUse.R:860:3', 'test-drugUse.R:883:3',
    'test-drugUse.R:932:3', 'test-drugUse.R:967:3', 'test-drugUse.R:1025:3',
    'test-patterns.R:2:3', 'test-plotProportionOfPatientsCovered.R:2:3',
    'test-plotProportionOfPatientsCovered.R:58:3',
    'test-plotProportionOfPatientsCovered.R:100:3', 'test-plotTreatment.R:2:3',
    'test-plots.R:2:3', 'test-readConceptList.R:2:3', 'test-require.R:2:3',
    'test-require.R:143:3', 'test-require.R:324:3', 'test-require.R:432:3',
    'test-require.R:526:3', 'test-require.R:597:3', 'test-indication.R:2:3',
    'test-indication.R:202:3', 'test-indication.R:364:3',
    'test-indication.R:481:3',
    'test-summariseProportionOfPatientsCovered.R:94:3',
    'test-summariseProportionOfPatientsCovered.R:170:3',
    'test-summariseProportionOfPatientsCovered.R:277:3',
    'test-summariseProportionOfPatientsCovered.R:497:3',
    'test-summariseProportionOfPatientsCovered.R:550:3', 'test-tables.R:2:3',
    'test-tables.R:132:3', 'test-tables.R:271:3', 'test-tables.R:393:3',
    'test-tables.R:502:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-indication.R:608:3'): summariseIndication ──────────────────────
  Error: rapi_execute: Failed to run query
  Error: INTERNAL Error: Attempted to dereference unique_ptr that is NULL!
  This error signals an assertion failure within DuckDB. This usually occurs due to unexpected conditions or errors in the program's logic.
  For more information, see https://duckdb.org/docs/dev/internal_errors
  Backtrace:
       ▆
    1. ├─DrugUtilisation::summariseIndication(...) at test-indication.R:608:3
    2. │ ├─dplyr::collect(...)
    3. │ └─DrugUtilisation::addIndication(...)
    4. │   ├─DrugUtilisation:::renameWindows(...)
    5. │   │ └─dplyr::rename(x, !!cols)
    6. │   ├─DrugUtilisation:::collapseIndication(...)
    7. │   │ └─base::colnames(x)
    8. │   │   └─base::is.data.frame(x)
    9. │   ├─dplyr::select(...)
   10. │   └─DrugUtilisation:::addUnknownIndication(...)
   11. │     └─PatientProfiles::addTableIntersectFlag(...)
   12. │       └─x %>% ...
   13. └─PatientProfiles:::.addIntersect(...)
   14.   ├─dplyr::select(...)
   15.   ├─dplyr::mutate(...)
   16.   └─PatientProfiles::addInObservation(...)
   17.     └─PatientProfiles:::computeTable(...)
   18.       ├─dplyr::compute(x, name = name, temporary = FALSE)
   19.       └─omopgenerics:::compute.cdm_table(x, name = name, temporary = FALSE)
   20.         ├─dplyr::compute(...)
   21.         └─CDMConnector:::compute.db_cdm(...)
   22.           └─CDMConnector:::.computeQuery(...)
   23.             └─CDMConnector:::.computePermanent(...)
   24.               ├─DBI::dbExecute(x$src$con, sql)
   25.               └─DBI::dbExecute(x$src$con, sql)
   26.                 ├─DBI::dbSendStatement(conn, statement, ...)
   27.                 └─DBI::dbSendStatement(conn, statement, ...)
   28.                   ├─DBI::dbSendQuery(conn, statement, ...)
   29.                   └─duckdb::dbSendQuery(conn, statement, ...)
   30.                     └─duckdb (local) .local(conn, statement, ...)
   31.                       └─duckdb:::duckdb_result(...)
   32.                         └─duckdb:::duckdb_execute(res)
   33.                           └─duckdb:::rapi_execute(...)
  
  [ FAIL 1 | WARN 88 | SKIP 50 | PASS 61 ]
  Error: Test failures
  Execution halted