Running ‘testthat.R’ [11s/20s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # tests/testthat.R
  > library(testthat)
  > library(RAGFlowChainR)
  > 
  > test_check("RAGFlowChainR")
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: rapi_execute(stmt, convert_opts)
   2: withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }})
   3: doTryCatch(return(expr), name, parentenv, handler)
   4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   5: tryCatchList(expr, classes, parentenv, handlers)
   6: tryCatch(withCallingHandlers(expr, condition = function(cnd) {    {        .__handler_frame__. <- TRUE        .__setup_frame__. <- frame        if (inherits(cnd, "message")) {            except <- c("warning", "error")        }        else if (inherits(cnd, "warning")) {            except <- "error"        }        else {            except <- ""        }    }    while (!is_null(cnd)) {        if (inherits(cnd, "error")) {            out <- handlers[[1L]](cnd)            if (!inherits(out, "rlang_zap"))                 throw(out)        }        inherit <- .subset2(.subset2(cnd, "rlang"), "inherit")        if (is_false(inherit)) {            return()        }        cnd <- .subset2(cnd, "parent")    }}), stackOverflowError = handlers[[1L]])
   7: rlang::try_fetch(rapi_execute(stmt, convert_opts), error = function(e) {    rethrow_error_from_rapi(e, call)})
   8: rethrow_rapi_execute(res@stmt_lst$ref, duckdb_convert_opts_impl(res@connection@convert_opts,     arrow = res@arrow))
   9: duckdb_execute(res)
  10: duckdb_result(connection = conn, stmt_lst = stmt_lst, arrow = arrow)
  11: .local(conn, statement, ...)
  12: dbSendQuery(conn, statement, ...)
  13: dbSendQuery(conn, statement, ...)
  14: dbSendStatement(conn, statement, ...)
  15: dbSendStatement(conn, statement, ...)
  16: dbExecute(tmp, "INSTALL fts; LOAD fts;")
  17: dbExecute(tmp, "INSTALL fts; LOAD fts;")
  18: doTryCatch(return(expr), name, parentenv, handler)
  19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatch({    tmp <- dbConnect(duckdb::duckdb(), ":memory:")    dbExecute(tmp, "INSTALL fts; LOAD fts;")}, error = function(e) {    message("FTS not available or failed to load: ", conditionMessage(e))    has_fts <<- FALSE}, finally = {    if (!is.null(tmp))         dbDisconnect(tmp, shutdown = TRUE)})
  22: eval(code, test_env)
  23: eval(code, test_env)
  24: 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)
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  28: doTryCatch(return(expr), name, parentenv, handler)
  29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  30: tryCatchList(expr, classes, parentenv, handlers)
  31: 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) {    })
  32: test_code(desc, code, env = parent.frame(), reporter = reporter)
  33: test_that("build_vector_index succeeds silently (vss/fts)", {    has_fts <- TRUE    tmp <- NULL    tryCatch({        tmp <- dbConnect(duckdb::duckdb(), ":memory:")        dbExecute(tmp, "INSTALL fts; LOAD fts;")    }, error = function(e) {        message("FTS not available or failed to load: ", conditionMessage(e))        has_fts <<- FALSE    }, finally = {        if (!is.null(tmp))             dbDisconnect(tmp, shutdown = TRUE)    })    if (!has_fts) {        skip("Skipping FTS test: DuckDB FTS extension not available or failed to load.")    }    con <- suppressWarnings(create_vectorstore(":memory:", TRUE,         1536))    insert_vectors(con, data.frame(page_content = "y"), mock_embed)    expect_silent(suppressWarnings(build_vector_index(con, c("vss",         "fts"))))    dbDisconnect(con, shutdown = TRUE)})
  34: eval(code, test_env)
  35: eval(code, test_env)
  36: 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)
  37: doTryCatch(return(expr), name, parentenv, handler)
  38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  39: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  40: doTryCatch(return(expr), name, parentenv, handler)
  41: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  42: tryCatchList(expr, classes, parentenv, handlers)
  43: 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) {    })
  44: test_code(test = NULL, code = exprs, env = env, reporter = get_reporter() %||%     StopReporter$new())
  45: source_file(path, env = env(env), desc = desc, error_call = error_call)
  46: FUN(X[[i]], ...)
  47: lapply(test_paths, test_one_file, env = env, desc = desc, error_call = error_call)
  48: doTryCatch(return(expr), name, parentenv, handler)
  49: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  50: tryCatchList(expr, classes, parentenv, handlers)
  51: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  52: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, desc = desc, error_call = error_call))
  53: 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,     desc = desc, load_package = load_package, error_call = error_call)
  54: 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,     load_package = load_package, parallel = parallel)
  55: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  56: test_check("RAGFlowChainR")
  An irrecoverable exception occurred. R is aborting now ...