Package: Characterization Check: tests New result: ERROR Running ‘testthat.R’ [43s/87s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > test_check("Characterization") Loading required package: Characterization Removing values less than 5 from val Removing values less than 50 from val Removing values less than 5 from val Removing values less than 5 from val and val2 Removing values less than 5 from val and val2 Removing values less than 5 from val3 Constructing features on server Fetching data from server Fetching data took 0.62 secs Constructing features on server Fetching data from server Fetching data took 0.789 secs Constructing during cohort covariates | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Censoring num_exposure_eras counts less than 9999 Censoring num_persons_exposed counts less than 9999 Censoring num_cases counts less than 9999 Censoring/removing dechallenge_attempt counts less than 9999 Censoring/removing DECHALLENGE FAIL or SUCCESS counts less than 9999 Censoring/removing rechallenge_attempt counts less than 9999 Censoring/removing rechallenge_fail or rechallenge_success counts less than 9999 Constructing features on server Fetching data from server Fetching data took 0.598 secs Constructing features on server Fetching data from server Fetching data took 0.516 secs Constructing during cohort covariates | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Constructing features on server Fetching data from server Fetching data took 0.689 secs Constructing features on server Fetching data from server Fetching data took 2.1 secs Constructing during cohort covariates | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Constructing features on server Fetching data from server Fetching data took 0.462 secs Constructing features on server Fetching data from server Fetching data took 0.541 secs Constructing during cohort covariates | | | 0% | |======== | 11% | |================ | 22% | |======================= | 33% | |=============================== | 44% | |======================================= | 56% | |=============================================== | 67% | |====================================================== | 78% | |============================================================== | 89% | |======================================================================| 100% | | | 0% | |======== | 11% | |================ | 22% | |======================= | 33% | |=============================== | 44% | |======================================= | 56% | |=============================================== | 67% | |====================================================== | 78% | |============================================================== | 89% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |=== | 4% | |====== | 8% | |========= | 12% | |============ | 17% | |=============== | 21% | |================== | 25% | |==================== | 29% | |======================= | 33% | |========================== | 38% | |============================= | 42% | |================================ | 46% | |=================================== | 50% | |====================================== | 54% | |========================================= | 58% | |============================================ | 62% | |=============================================== | 67% | |================================================== | 71% | |==================================================== | 75% | |======================================================= | 79% | |========================================================== | 83% | |============================================================= | 88% | |================================================================ | 92% | |=================================================================== | 96% | |======================================================================| 100% Removing num_events less than 1e+06 Censoring num_exposure_eras counts less than 1e+06 Censoring num_persons_exposed counts less than 1e+06 Censoring num_cases counts less than 1e+06 Censoring/removing dechallenge_attempt counts less than 1e+06 Censoring/removing DECHALLENGE FAIL or SUCCESS counts less than 1e+06 Censoring/removing rechallenge_attempt counts less than 1e+06 Censoring/removing rechallenge_fail or rechallenge_success counts less than 1e+06 Constructing features on server Fetching data from server Fetching data took 0.484 secs Removing sum_value counts less than 1e+06 Removing count_value counts less than 1e+06 Removing row_count counts less than 1e+06 Removing person_count counts less than 1e+06 Constructing features on server Fetching data from server Fetching data took 2.29 secs Constructing during cohort covariates | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Removing sum_value counts less than 1e+06 Removing count_value counts less than 1e+06 Removing row_count counts less than 1e+06 Removing person_count counts less than 1e+06 Removing sum_value counts less than 1e+06 Removing num_events less than 9999 Constructing features on server Fetching data from server Fetching data took 0.607 secs Constructing features on server Fetching data from server Fetching data took 0.782 secs Constructing during cohort covariates | | | 0% | |======== | 11% | |================ | 22% | |======================= | 33% | |=============================== | 44% | |======================================= | 56% | |=============================================== | 67% | |====================================================== | 78% | |============================================================== | 89% | |======================================================================| 100% | | | 0% | |======== | 11% | |================ | 22% | |======================= | 33% | |=============================== | 44% | |======================================= | 56% | |=============================================== | 67% | |====================================================== | 78% | |============================================================== | 89% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |=== | 4% | |====== | 8% | |========= | 12% | |============ | 17% | |=============== | 21% | |================== | 25% | |==================== | 29% | |======================= | 33% | |========================== | 38% | |============================= | 42% | |================================ | 46% | |=================================== | 50% | |====================================== | 54% | |========================================= | 58% | |============================================ | 62% | |=============================================== | 67% | |================================================== | 71% | |==================================================== | 75% | |======================================================= | 79% | |========================================================== | 83% | |============================================================= | 88% | |================================================================ | 92% | |=================================================================== | 96% | |======================================================================| 100% Creating characterization results tables Migrating data set Migrator using SQL files in Characterization Creating migrations table Migrations table created Executing migration: Migration_1-v0_3_0_store_version.sql Saving migration: Migration_1-v0_3_0_store_version.sql Migration complete Migration_1-v0_3_0_store_version.sql Executing migration: Migration_2-v2_1_1_mean_exposure_time_type.sql Saving migration: Migration_2-v2_1_1_mean_exposure_time_type.sql Migration complete Migration_2-v2_1_1_mean_exposure_time_type.sql Closing database connection Updating version number - Preparing to upload rows 1 through 102 - Preparing to upload rows 1 through 13 - Preparing to upload rows 1 through 95 - Preparing to upload rows 1 through 199 - Preparing to upload rows 1 through 13 - Preparing to upload rows 1 through 2 - Preparing to upload rows 1 through 23 - Preparing to upload rows 1 through 11 Uploading data took 10.9 secs [ FAIL 1 | WARN 21 | SKIP 7 | PASS 231 ] ══ Skipped tests (7) ═══════════════════════════════════════════════════════════ • not run locally (7): 'test-dbs.R:163:5', 'test-dbs.R:163:5', 'test-dbs.R:163:5', 'test-dbs.R:163:5', 'test-dbs.R:163:5', 'test-dbs.R:163:5', 'test-dbs.R:163:5' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-viewShiny.R:98:3'): prepareCharacterizationShiny works ───────── Error in `.subset2(x, i, exact = exact)`: subscript out of bounds Backtrace: ▆ 1. └─Characterization:::prepareCharacterizationShiny(...) at test-viewShiny.R:98:3 2. ├─DatabaseConnector::insertTable(...) 3. └─DatabaseConnector:::insertTable.DatabaseConnectorDbiConnection(...) 4. ├─DatabaseConnector::insertTable(...) 5. └─DatabaseConnector:::insertTable.default(...) 6. ├─data[[i]] 7. └─base::`[[.data.frame`(data, i) 8. └─(function(x, i, exact) if (is.matrix(i)) as.matrix(x)[[i]] else .subset2(x, ... [ FAIL 1 | WARN 21 | SKIP 7 | PASS 231 ] Error: Test failures In addition: Warning message: call dbDisconnect() when finished working with a connection Execution halted Package: CohortGenerator Check: tests New result: ERROR Running ‘testthat.R’ [68s/65s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(CohortGenerator) Loading required package: DatabaseConnector Loading required package: R6 > > test_check("CohortGenerator") attempting to download GiBleed trying URL 'https://raw.githubusercontent.com/OHDSI/EunomiaDatasets/main/datasets/GiBleed/GiBleed_5.3.zip' Content type 'application/zip' length 6861852 bytes (6.5 MB) ================================================== downloaded 6.5 MB attempting to extract and load: /home/hornik/tmp/scratch/RtmpVbZ96t/GiBleed_5.3.zip to: /home/hornik/tmp/scratch/RtmpVbZ96t/GiBleed_5.3.sqlite Initiating cluster consisting only of main thread Generating cohort set took 0.75 secs Initiating cluster consisting only of main thread Generating cohort set took 0.51 secs Initiating cluster consisting only of main thread Generating cohort set took 0.05 secs Initiating cluster consisting only of main thread Generating cohort set took 0.38 secs Initiating cluster consisting only of main thread Generating cohort set took 0.39 secs Initiating cluster consisting only of main thread Generating cohort set took 0.04 secs Initiating cluster consisting only of main thread An error occurred while generating cohortName = Fail Cohort. Error: Error in `.createErrorReport()`: ! Error executing SQL: no such table: main.non_existant_table An error report has been created at /home/hornik/tmp/CRAN_recheck/CohortGenerator.Rcheck/tests/testthat/errorReportSql.txt [1] "Create cohorts with stopOnError = FALSE" Initiating cluster consisting only of main thread An error occurred while generating cohortName = Fail Cohort. Error: Error in `.createErrorReport()`: ! Error executing SQL: no such table: main.non_existant_table An error report has been created at /home/hornik/tmp/CRAN_recheck/CohortGenerator.Rcheck/tests/testthat/errorReportSql.txt Generating cohort set took 0.38 secs Initiating cluster consisting only of main thread An error occurred while generating cohortName = Fail Cohort. Error: Error in `.createErrorReport()`: ! Error executing SQL: no such table: main.non_existant_table An error report has been created at /home/hornik/tmp/CRAN_recheck/CohortGenerator.Rcheck/tests/testthat/errorReportSql.txt Generating cohort set took 0.39 secs Initiating cluster consisting only of main thread Generating cohort set took 0.18 secs trying URL 'https://raw.githubusercontent.com/OHDSI/EunomiaDatasets/main/datasets/GiBleed/GiBleed_5.3.zip' Content type 'application/zip' length 6861852 bytes (6.5 MB) ================================================== downloaded 6.5 MB Cohorts created in table main.cohort trying URL 'https://raw.githubusercontent.com/OHDSI/EunomiaDatasets/main/datasets/GiBleed/GiBleed_5.3.zip' Content type 'application/zip' length 6861852 bytes (6.5 MB) ================================================== downloaded 6.5 MB Initiating cluster consisting only of main thread Generating cohort set took 0.4 secs | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Generating sample set took 0.36 secs Generating sample set took 0.04 secs | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Generating sample set took 0.23 secs | | | 0% | |================== | 25% | |=================================== | 50% | |==================================================== | 75% | |======================================================================| 100% Initiating cluster consisting only of main thread Generating cohort set took 0.4 secs Initiating cluster consisting only of main thread Generating cohort set took 0.4 secs Initiating cluster consisting only of main thread Generating cohort set took 0.43 secs Initiating cluster consisting only of main thread Generating cohort set took 0.4 secs Initiating cluster consisting only of main thread Generating cohort set took 0.43 secs Initiating cluster consisting only of main thread Generating cohort set took 0.41 secs Generating negative control outcomes set took 0.05 secs Generating negative control outcomes set took 0.05 secs Negative control set skipped Generating negative control outcomes set took 0.04 secs Negative control set skipped Generating negative control outcomes set took 0.05 secs Negative control set skipped trying URL 'https://jdbc.postgresql.org/download/postgresql-42.7.3.jar' Content type 'application/java-archive' length 1089312 bytes (1.0 MB) ================================================== downloaded 1.0 MB Initiating cluster consisting only of main thread Generating cohort set took 0.43 secs Generating negative control outcomes set took 0.04 secs Initiating cluster consisting only of main thread Generating cohort set took 0.4 secs Generating negative control outcomes set took 0.05 secs Initiating cluster consisting only of main thread Generating cohort set took 0.5 secs Generating negative control outcomes set took 0.06 secs Initiating cluster consisting only of main thread Generating cohort set took 0.59 secs Initiating cluster consisting only of main thread Generating cohort set took 0.08 secs Initiating cluster consisting only of main thread Generating cohort set took 0.53 secs [ FAIL 17 | WARN 0 | SKIP 3 | PASS 395 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-ResultsDataModel.R:85:3', 'test-ResultsDataModel.R:131:3', 'test-dbms-platforms.R:101:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-Subsets.R:1090:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1101, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2001-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1091:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1102, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2003-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1092:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1103, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2005-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1093:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1104, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2007-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1094:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1105, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2003-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1095:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1105, ]$COHORT_START_DATE[[2]] not equal to lubridate::date("2005-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1097:3'): Subset logic checks ────────────────────── cohorts[cohorts$COHORT_DEFINITION_ID == 1107, ]$COHORT_START_DATE[[1]] not equal to lubridate::date("2003-01-01"). target is NULL, current is Date ── Failure ('test-Subsets.R:1100:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1201, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1101:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1202, ]) not equal to 4. 1/1 mismatches [1] 0 - 4 == -4 ── Failure ('test-Subsets.R:1102:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1203, ]) not equal to 4. 1/1 mismatches [1] 0 - 4 == -4 ── Failure ('test-Subsets.R:1103:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1204, ]) not equal to 4. 1/1 mismatches [1] 0 - 4 == -4 ── Failure ('test-Subsets.R:1106:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1301, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1107:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1302, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1108:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1303, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1109:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1304, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1110:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1305, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 ── Failure ('test-Subsets.R:1111:3'): Subset logic checks ────────────────────── nrow(cohorts[cohorts$COHORT_DEFINITION_ID == 1306, ]) not equal to 2. 1/1 mismatches [1] 0 - 2 == -2 [ FAIL 17 | WARN 0 | SKIP 3 | PASS 395 ] Error: Test failures In addition: Warning message: call dbDisconnect() when finished working with a connection Execution halted Package: ResultModelManager Check: tests New result: ERROR Running ‘testthat.R’ [10s/10s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(ResultModelManager) Loading required package: R6 Loading required package: DatabaseConnector > > test_check("ResultModelManager") Connecting using SQLite driver trying URL 'https://jdbc.postgresql.org/download/postgresql-42.7.3.jar' Content type 'application/java-archive' length 1089312 bytes (1.0 MB) ================================================== downloaded 1.0 MB DatabaseConnector postgresql JDBC driver downloaded to '/home/hornik/tmp/scratch/Rtmpgy7IVk/file11db9e1964dd89'. Connecting using SQLite driver | | | 0% | |=================================== | 50% | |======================================================================| 100% Executing SQL took 0.00856 secs Connecting using SQLite driver Closing database connection Connecting using SQLite driver Closing database connection Connecting using SQLite driver Closing database connection | | | 0% | |======================================================================| 100% Executing SQL took 0.00508 secs Connecting using SQLite driver | | | 0% | |=================================== | 50% | |======================================================================| 100% Executing SQL took 0.00494 secs Using DatabaseConnector jdbc driver. Initalizing pooled connection Connecting using SQLite driver Initalizing pooled connection Connecting using SQLite driver Initalizing pooled connection Connecting using SQLite driver | | | 0% | |======================================================================| 100% Executing SQL took 0.00843 secs Migrator using SQL files in ResultModelManager Connecting using SQLite driver Creating migrations table Executing SQL took 0.00395 secs Migrations table created Executing migration: Migration_1-example.sql Executing SQL took 0.0073 secs Saving migration: Migration_1-example.sql Executing SQL took 0.00389 secs Migration complete Migration_1-example.sql Executing migration: Migration_2-MultiPlatformExample.sql Executing SQL took 0.00456 secs Saving migration: Migration_2-MultiPlatformExample.sql Executing SQL took 0.092 secs Migration complete Migration_2-MultiPlatformExample.sql Closing database connection Connecting using SQLite driver Migrator using SQL files in ResultModelManager Connecting using SQLite driver Closing database connection Migrator using SQL files in directory structure Connecting using SQLite driver Creating migrations table Executing SQL took 0.00408 secs Migrations table created Executing migration: Migration_1-example.sql Executing SQL took 0.00501 secs Saving migration: Migration_1-example.sql Executing SQL took 0.00383 secs Migration complete Migration_1-example.sql Executing migration: Migration_2-MultiPlatformExample.sql Executing SQL took 0.0209 secs Saving migration: Migration_2-MultiPlatformExample.sql Executing SQL took 0.00382 secs Migration complete Migration_2-MultiPlatformExample.sql Closing database connection Connecting using SQLite driver Migrator using SQL files in directory structure Column databaseId in table foo in results folder foo.zip is of type character, but was expecting bigint. Attempting to convert. Column charField in table foo in results folder foo.zip is of type numeric, but was expecting varchar. Attempting to convert. Column dateField in table foo in results folder foo.zip is of type character, but was expecting date. Attempting to convert. Using DatabaseConnector jdbc driver. Connecting using SQLite driver Using DatabaseConnector jdbc driver. Initalizing pooled connection Connecting using SQLite driver Connecting using SQLite driver Executing SQL took 0.00352 secs Executing SQL took 0.00326 secs Closing database connection null/na primary keys found duplicate primary keys found Connecting using SQLite driver Inserting data took 0.0602 secs Connecting using SQLite driver | | | 0% | |============ | 17% | |======================= | 33% | |=================================== | 50% | |=============================================== | 67% | |========================================================== | 83% | |======================================================================| 100% Executing SQL took 0.00748 secs Connecting using SQLite driver [ FAIL 1 | WARN 0 | SKIP 11 | PASS 137 ] ══ Skipped tests (11) ══════════════════════════════════════════════════════════ • On CRAN (3): 'test-DataMigrationManager.R:70:3', 'test-DataMigrationManager.R:92:3', 'test-QueryNamespace.R:63:3' • results db not available (8): 'test-DataModel.R:18:3', 'test-DataModel.R:56:3', 'test-DataModel.R:142:3', 'test-DataModel.R:197:3', 'test-DataModel.R:237:3', 'test-PooledConnection.R:34:3', 'test-ResultExportManager.R:130:3', 'test-Utils.R:15:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-ConnectionHandler.R:79:3'): Database Connector Class works ─── data2$CNT_TEST (`actual`) not equal to 6 (`expected`). `actual` is NULL `expected` is a double vector (6) Backtrace: ▆ 1. └─ResultModelManager (local) genericTests(...) at test-ConnectionHandler.R:79:3 2. └─testthat::expect_equal(data2$CNT_TEST, 6) at test-ConnectionHandler.R:58:3 [ FAIL 1 | WARN 0 | SKIP 11 | PASS 137 ] Error: Test failures Execution halted Closing database connection