Running ‘testthat.R’ [13s/44s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(PKbioanalysis)
  
  Attaching package: 'PKbioanalysis'
  
  The following object is masked from 'package:stats':
  
      integrate
  
  > 
  > test_check("PKbioanalysis")
  Error in `source_dir()`:
  ! Failed to evaluate './helper-global.R'.
  Caused by error in `.local()`:
  ! {"exception_type":"IO","exception_message":"Could not set lock on file \"/data/gannet/ripley/.local/share/R/PKbioanalysis/samples.db\": Conflicting lock is held in /data/gannet/ripley/R/R-devel/bin/exec/R (PID 3797446) by user ripley. However, you would be able to open this database in read-only mode, e.g. by using the -readonly parameter in the CLI. See also https://duckdb.org/docs/stable/connect/concurrency","errno":"11"}
  ℹ Context: rapi_startup
  Backtrace:
       ▆
    1. ├─testthat::test_check("PKbioanalysis")
    2. │ └─testthat::test_dir(...)
    3. │   └─testthat:::test_files(...)
    4. │     └─testthat:::test_files_serial(...)
    5. │       └─testthat:::test_files_setup_state(...)
    6. │         └─testthat::source_test_helpers(".", env)
    7. │           └─testthat::source_dir(path, "^helper.*\\.[rR]$", env = env, wrap = FALSE)
    8. │             └─base::lapply(...)
    9. │               └─testthat (local) FUN(X[[i]], ...)
   10. │                 └─testthat::source_file(...)
   11. │                   ├─base::withCallingHandlers(...)
   12. │                   └─base::eval(exprs, env)
   13. │                     └─base::eval(exprs, env)
   14. │                       └─PKbioanalysis:::.save_cmpd_db(x) at ./helper-global.R:21:1
   15. │                         └─PKbioanalysis:::.connect_to_db()
   16. │                           ├─duckdb::dbConnect(duckdb::duckdb(), dbdir = db_path)
   17. │                           └─duckdb::dbConnect(duckdb::duckdb(), dbdir = db_path)
   18. │                             └─duckdb (local) .local(drv, ...)
   19. │                               └─duckdb::duckdb(dbdir, read_only, bigint, config)
   20. │                                 ├─methods::new(...)
   21. │                                 │ ├─methods::initialize(value, ...)
   22. │                                 │ └─methods::initialize(value, ...)
   23. │                                 └─duckdb:::rethrow_rapi_startup(dbdir, read_only, config, environment_scan)
   24. │                                   ├─rlang::try_fetch(...)
   25. │                                   │ ├─base::tryCatch(...)
   26. │                                   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   27. │                                   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   28. │                                   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   29. │                                   │ └─base::withCallingHandlers(...)
   30. │                                   └─duckdb:::rapi_startup(dbdir, readonly, configsexp, environment_scan)
   31. ├─duckdb (local) `<fn>`("rapi_startup", "{\"exception_type\":\"IO\",\"exception_message\":\"Could not set lock on file \\\"/data/gannet/ripley/.local/share/R/PKbioanalysis/samples.db\\\": Conflicting lock is held in /data/gannet/ripley/R/R-devel/bin/exec/R (PID 3797446) by user ripley. However, you would be able to open this database in read-only mode, e.g. by using the -readonly parameter in the CLI. See also https://duckdb.org/docs/stable/connect/concurrency\",\"errno\":\"11\"}")
   32. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   33. │   └─rlang:::signal_abort(cnd, .file)
   34. │     └─base::signalCondition(cnd)
   35. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   36.   └─handlers[[1L]](cnd)
   37.     └─duckdb:::rethrow_error_from_rapi(e, call)
   38.       └─rlang::abort(msg, call = call)
  Execution halted