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 0x558800000005, cause 'memory not mapped'
  
  Traceback:
   1: lapply(dots, function(x) {    if (is_null(get_expr(x))) {        NULL    }    else if (is_atomic(get_expr(x))) {        escape(get_expr(x), con = con)    }    else {        mask <- sql_data_mask(x, variant, con = con, window = window)        escape(eval_tidy(x, mask), con = con)    }})
   2: translate_sql_(select_expr, con, window = FALSE, context = list(clause = "SELECT"))
   3: get_select_sql(op$select, op$select_operation, op_vars(op$x),     con)
   4: sql_build.lazy_select_query(query, con = con, ...)
   5: sql_build(query, con = con, ...)
   6: sql_render.lazy_query(query$lazy_query, con = con, ..., subquery = subquery,     lvl = lvl, cte = cte)
   7: sql_render(query$lazy_query, con = con, ..., subquery = subquery,     lvl = lvl, cte = cte)
   8: sql_render.tbl_lazy(sql, con = con, ..., cte = cte)
   9: sql_render(sql, con = con, ..., cte = cte)
  10: db_sql_render.DBIConnection(x$src$con, x, cte = cte)
  11: db_sql_render(x$src$con, x, cte = cte)
  12: collect.tbl_sql(.data)
  13: collect(.data)
  14: pull.tbl_sql(., n)
  15: pull(., n)
  16: get_data(db, x, participant_id, start_date, end_date) %>% dplyr::count() %>%     pull(n)
  17: FUN(X[[i]], ...)
  18: vapply(sensor, function(x) {    get_data(db, x, participant_id, start_date, end_date) %>%         dplyr::count() %>% pull(n)}, integer(1))
  19: get_nrows(db)
  20: eval_bare(expr, quo_get_env(quo))
  21: quasi_label(enquo(object), label, arg = "object")
  22: expect_equal(sum(get_nrows(db)), 0L)
  23: eval(code, test_env)
  24: eval(code, test_env)
  25: 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)
  26: doTryCatch(return(expr), name, parentenv, handler)
  27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  29: doTryCatch(return(expr), name, parentenv, handler)
  30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  31: tryCatchList(expr, classes, parentenv, handlers)
  32: 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) {    })
  33: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  34: 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)})
  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(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  46: source_file(path, env(env), wrap = wrap)
  47: FUN(X[[i]], ...)
  48: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  49: doTryCatch(return(expr), name, parentenv, handler)
  50: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  51: tryCatchList(expr, classes, parentenv, handlers)
  52: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  53: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  54: 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)
  55: 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)
  56: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  57: test_check("mpathsenser")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault