R Under development (unstable) (2024-07-10 r86888 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(ResultModelManager) Loading required package: R6 Loading required package: DatabaseConnector > > test_check("ResultModelManager") Connecting using SQLite driver trying URL 'https://ohdsi.github.io/DatabaseConnectorJars/postgresqlV42.2.18.zip' Content type 'application/zip' length 931791 bytes (909 KB) ================================================== downloaded 909 KB DatabaseConnector postgresql JDBC driver downloaded to 'C:\Users\CRAN\Documents/.jdbcDrivers'. Connecting using SQLite driver | | | 0% | |=================================== | 50% | |======================================================================| 100% Executing SQL took 0.0132 secs Connecting using SQLite driver [1] "SELECT 1 * WHERE;" attr(,"sqlDialect") [1] "sqlite" Closing database connection Connecting using SQLite driver Closing database connection Connecting using SQLite driver Closing database connection | | | 0% | |======================================================================| 100% Executing SQL took 0.00466 secs Connecting using SQLite driver | | | 0% | |=================================== | 50% | |======================================================================| 100% Executing SQL took 0.00567 secs Using DatabaseConnector jdbc driver. Initalizing pooled connection Connecting using SQLite driver [1] "SELECT 1 * WHERE;" attr(,"sqlDialect") [1] "sqlite" Initalizing pooled connection Connecting using SQLite driver Initalizing pooled connection Connecting using SQLite driver | | | 0% | |======================================================================| 100% Executing SQL took 0.0051 secs Migrator using SQL files in ResultModelManager Connecting using SQLite driver Creating migrations table Executing SQL took 0.00415 secs Migrations table created Migrator using SQL files in directory structure 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 Connecting using SQLite driver Executing SQL took 0.00501 secs Closing database connection Error in .subset2(e, "finalize")() : attempt to apply non-function Calls: -> In addition: Warning message: call dbDisconnect() when finished working with a connection Connecting using SQLite driver Executing SQL took 0.00479 secs Connecting using SQLite driver Using DatabaseConnector jdbc driver. Initalizing pooled connection Connecting using SQLite driver Closing database connection null/na primary keys found duplicate primary keys found Connecting using SQLite driver Inserting data took 0.0631 secs Connecting using SQLite driver | | | 0% | |============ | 17% | |======================= | 33% | |=================================== | 50% | |=============================================== | 67% | |========================================================== | 83% | |======================================================================| 100% Executing SQL took 0.0105 secs Connecting using SQLite driver [ FAIL 6 | WARN 2 | SKIP 7 | PASS 112 ] ══ Skipped tests (7) ═══════════════════════════════════════════════════════════ • results db not available (7): '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-ResultExportManager.R:130:3', 'test-Utils.R:15:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-DataMigrationManager.R:26:3'): Migrations manager runs in package mode ── Check on 'manager$getStatus()' failed: Must have exactly 2 rows, but has 0 rows Backtrace: ▆ 1. └─checkmate::expect_data_frame(manager$getStatus(), nrows = 2) at test-DataMigrationManager.R:26:3 2. └─checkmate::makeExpectation(x, res, info, label) ── Failure ('test-DataMigrationManager.R:27:3'): Migrations manager runs in package mode ── all(manager$getStatus()$executed) is not FALSE `actual`: TRUE `expected`: FALSE ── Error ('test-DataMigrationManager.R:28:3'): Migrations manager runs in package mode ── Error in `!migrations$executed`: invalid argument type Backtrace: ▆ 1. └─manager$executeMigrations() at test-DataMigrationManager.R:28:3 2. ├─migrations[!migrations$executed, ] 3. └─base::`[.data.frame`(migrations, !migrations$executed, ) ── Error ('test-DataMigrationManager.R:60:3'): Migrations manager runs in folder mode ── Error in `!migrations$executed`: invalid argument type Backtrace: ▆ 1. └─manager$executeMigrations() at test-DataMigrationManager.R:60:3 2. ├─migrations[!migrations$executed, ] 3. └─base::`[.data.frame`(migrations, !migrations$executed, ) ── Error ('test-DataMigrationManager.R:70:3'): Add migration and execute ─────── Error in `file(file, ifelse(append, "a", "w"))`: cannot open the connection Backtrace: ▆ 1. └─base::write(...) at test-DataMigrationManager.R:70:3 2. └─base::cat(...) 3. └─base::file(file, ifelse(append, "a", "w")) ── Error ('test-DataMigrationManager.R:91:3'): Add invalid filename ──────────── Error in `file(file, ifelse(append, "a", "w"))`: cannot open the connection Backtrace: ▆ 1. └─base::write("", file.path("migrations", "sql_server", "foo.sql")) at test-DataMigrationManager.R:91:3 2. └─base::cat(...) 3. └─base::file(file, ifelse(append, "a", "w")) [ FAIL 6 | WARN 2 | SKIP 7 | PASS 112 ] Error: Test failures Execution halted Closing database connection