Running ‘testthat.R’ [59s/84s]
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 0x55c100000000, cause 'memory not mapped'
  
  Traceback:
   1: RSQLite::rsqliteVersion()
   2: .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version)
   3: numeric_version(RSQLite::rsqliteVersion()[[2]])
   4: sqlite_version()
   5: is_environment(x)
   6: check_environment(window)
   7: sql_variant(sql_translator(.parent = base_scalar, as.numeric = sql_cast("REAL"),     as.double = sql_cast("REAL"), log = function(x, base = exp(1)) {        if (base != exp(1)) {            sql_expr(log(!!x)/log(!!base))        }        else {            sql_expr(log(!!x))        }    }, paste = sql_paste_infix(" ", "||", function(x) sql_expr(cast(!!x %as%         text))), paste0 = sql_paste_infix("", "||", function(x) sql_expr(cast(!!x %as%         text))), pmin = sql_aggregate_n("MIN", "pmin"), pmax = sql_aggregate_n("MAX",         "pmax"), today = function() {        date <- function(x) {        }        sql_expr(date("now"))    }, now = function() sql_expr(datetime("now")), year = function(x) sql_expr(cast(strftime("%Y",         !!x) %as% NUMERIC)), month = function(x) sql_expr(cast(strftime("%m",         !!x) %as% NUMERIC)), mday = function(x) sql_expr(cast(strftime("%d",         !!x) %as% NUMERIC)), day = function(x) sql_expr(cast(strftime("%d",         !!x) %as% NUMERIC)), hour = function(x) sql_expr(cast(strftime("%H",         !!x) %as% NUMERIC)), minute = function(x) sql_expr(cast(strftime("%M",         !!x) %as% NUMERIC)), second = function(x) sql_expr(cast(strftime("%f",         !!x) %as% REAL)), yday = function(x) sql_expr(cast(strftime("%j",         !!x) %as% NUMERIC)), ), sql_translator(.parent = base_agg,     sd = sql_aggregate("STDEV", "sd"), median = sql_aggregate("MEDIAN"),     quantile = sql_not_supported("quantile"), ), if (sqlite_version() >=     "3.25") {    sql_translator(.parent = base_win, sd = win_aggregate("STDEV"),         median = win_absent("median"), quantile = sql_not_supported("quantile"),         )} else {    base_no_win})
   8: sql_translation.SQLiteConnection(con)
   9: sql_translation(con)
  10: sql_translate_env.DBIConnection(con, ...)
  11: eval_bare(expr((!!fun)(con, ...)))
  12: dbplyr_fallback(con, "sql_translate_env")
  13: dbplyr_sql_translation(con)
  14: translate_sql_(select_expr, con, window = FALSE, context = list(clause = "SELECT"))
  15: get_select_sql(op$select, op$select_operation, op_vars(op$x),     con)
  16: sql_build.lazy_select_query(query, con = con, ...)
  17: sql_build(query, con = con, ...)
  18: sql_render.lazy_query(query$lazy_query, con = con, ..., subquery = subquery,     lvl = lvl, cte = cte)
  19: sql_render(query$lazy_query, con = con, ..., subquery = subquery,     lvl = lvl, cte = cte)
  20: sql_render.tbl_lazy(sql, con = con, ..., cte = cte)
  21: sql_render(sql, con = con, ..., cte = cte)
  22: db_sql_render.DBIConnection(x$src$con, x, cte = cte)
  23: db_sql_render(x$src$con, x, cte = cte)
  24: collect.tbl_sql(.data)
  25: collect(.data)
  26: pull.tbl_sql(., n)
  27: pull(., n)
  28: get_data(db, x, participant_id, start_date, end_date) %>% dplyr::count() %>%     pull(n)
  29: FUN(X[[i]], ...)
  30: vapply(sensor, function(x) {    get_data(db, x, participant_id, start_date, end_date) %>%         dplyr::count() %>% pull(n)}, integer(1))
  31: get_nrows(db)
  32: eval_bare(expr, quo_get_env(quo))
  33: quasi_label(enquo(object), arg = "object")
  34: expect_vector(get_nrows(db), integer(), length(sensors))
  35: eval(code, test_env)
  36: eval(code, test_env)
  37: 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)
  38: doTryCatch(return(expr), name, parentenv, handler)
  39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  40: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  41: doTryCatch(return(expr), name, parentenv, handler)
  42: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  43: tryCatchList(expr, classes, parentenv, handlers)
  44: 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) {    })
  45: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  46: test_that("get_nrows", {    db <- open_db(system.file("testdata", package = "mpathsenser"),         "test.db")    expect_vector(get_nrows(db), integer(), length(sensors))    dbDisconnect(db)})
  47: eval(code, test_env)
  48: eval(code, test_env)
  49: 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)
  50: doTryCatch(return(expr), name, parentenv, handler)
  51: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  52: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  53: doTryCatch(return(expr), name, parentenv, handler)
  54: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  55: tryCatchList(expr, classes, parentenv, handlers)
  56: 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) {    })
  57: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  58: source_file(path, env(env), wrap = wrap)
  59: FUN(X[[i]], ...)
  60: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  61: doTryCatch(return(expr), name, parentenv, handler)
  62: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  63: tryCatchList(expr, classes, parentenv, handlers)
  64: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  65: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  66: 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)
  67: 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)
  68: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  69: test_check("mpathsenser")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault