Running ‘testthat.R’ [62s/78s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mpathsenser)
  > 
  > test_check("mpathsenser")
  
  Attaching package: 'purrr'
  
  The following object is masked from 'package:testthat':
  
      is_null
  
  
   *** caught segfault ***
  address 0x30, cause 'memory not mapped'
  
  Traceback:
   1: result_fetch(res@ptr, n = n)
   2: .local(res, n, ...)
   3: dbFetch(res, n = n)
   4: dbFetch(res, n = n)
   5: tryCatchList(expr, classes, parentenv, handlers)
   6: tryCatch({    out <- dbFetch(res, n = n)    if (warn_incomplete) {        res_warn_incomplete(res, "n = Inf")    }}, finally = {    dbClearResult(res)})
   7: db_collect.DBIConnection(x$src$con, sql, n = n, warn_incomplete = warn_incomplete)
   8: db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete)
   9: doTryCatch(return(expr), name, parentenv, handler)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: tryCatchList(expr, classes, parentenv, handlers)
  12: tryCatch(out <- db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete),     error = function(cnd) {        cli_abort("Failed to collect lazy table.", parent = cnd)    })
  13: collect.tbl_sql(.data)
  14: collect(.data)
  15: pull.tbl_sql(., n)
  16: pull(., n)
  17: get_data(db, x, participant_id, start_date, end_date) %>% dplyr::count() %>%     pull(n)
  18: FUN(X[[i]], ...)
  19: vapply(sensor, function(x) {    get_data(db, x, participant_id, start_date, end_date) %>%         dplyr::count() %>% pull(n)}, integer(1))
  20: get_nrows(db)
  21: eval(code, test_env)
  22: eval(code, test_env)
  23: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  24: doTryCatch(return(expr), name, parentenv, handler)
  25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  26: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  27: doTryCatch(return(expr), name, parentenv, handler)
  28: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  29: tryCatchList(expr, classes, parentenv, handlers)
  30: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  31: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  32: test_that("clear_sensors_db", {    path <- system.file("testdata", package = "mpathsenser")    filename <- tempfile("foo", fileext = ".db")    db <- create_db(NULL, filename)    suppressMessages(import(path, db = db, recursive = FALSE))    original <- get_nrows(db)    res <- clear_sensors_db(db)    expect_type(res, "list")    expect_length(res, length(sensors))    expect_equal(Reduce(`+`, res), sum(original))    expect_equal(sum(get_nrows(db)), 0L)    dbDisconnect(db)    file.remove(filename)})
  33: eval(code, test_env)
  34: eval(code, test_env)
  35: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  36: doTryCatch(return(expr), name, parentenv, handler)
  37: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  38: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  39: doTryCatch(return(expr), name, parentenv, handler)
  40: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  41: tryCatchList(expr, classes, parentenv, handlers)
  42: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  43: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  44: source_file(path, env(env), wrap = wrap)
  45: FUN(X[[i]], ...)
  46: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  47: doTryCatch(return(expr), name, parentenv, handler)
  48: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  49: tryCatchList(expr, classes, parentenv, handlers)
  50: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  51: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  52: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package)
  53: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package, parallel = parallel)
  54: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  55: test_check("mpathsenser")
  An irrecoverable exception occurred. R is aborting now ...