diff --git a/DESCRIPTION b/DESCRIPTION index 71f1ca05..b30ef032 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -43,7 +43,7 @@ Imports: Suggests: callr, conflicted, - duckdb, + duckdb (>= 0.10.1), ggplot2, here, jsonlite, diff --git a/R/connection.R b/R/connection.R index bf329ed4..dfcaf09f 100644 --- a/R/connection.R +++ b/R/connection.R @@ -245,5 +245,5 @@ close_connection <- function(conn) { # Check arguments checkmate::assert_class(conn, "DBIConnection") - DBI::dbDisconnect(conn, shutdown = TRUE) + DBI::dbDisconnect(conn) } diff --git a/data-raw/benchmark.R b/data-raw/benchmark.R index 3e0f2a5a..a468c02c 100644 --- a/data-raw/benchmark.R +++ b/data-raw/benchmark.R @@ -175,7 +175,7 @@ if (identical(Sys.getenv("CI"), "true") && identical(Sys.getenv("BACKEND"), "")) } # Clean up - purrr::walk(conns, ~ DBI::dbDisconnect(., shutdown = TRUE)) + purrr::walk(conns, DBI::dbDisconnect) }) detach("package:SCDB", unload = TRUE) diff --git a/tests/testthat/helper-setup.R b/tests/testthat/helper-setup.R index e75a8936..e52537d2 100644 --- a/tests/testthat/helper-setup.R +++ b/tests/testthat/helper-setup.R @@ -103,11 +103,6 @@ get_test_conns <- function() { purrr::walk2(test_conns, names(test_conns), \(conn, conn_name) purrr::walk(purrr::pluck(conn_post_connect, conn_name), ~ DBI::dbExecute(conn, .))) - # Shutdown drivers that needs it - drivers |> - purrr::keep(~ inherits(., "duckdb_driver")) |> - purrr::walk(~ duckdb::duckdb_shutdown(.)) - # Inform the user about the tested back ends: msg <- paste(sep = "\n", "#####", diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index d57b3770..b25546e8 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -20,7 +20,7 @@ for (conn_id in seq_along(conns)) { coll$push(glue::glue("Tests require the schema 'test.one' to exist in connection ({names(conns)[[conn_id]]}).")) } - DBI::dbDisconnect(conn, shutdown = TRUE) + DBI::dbDisconnect(conn) } checkmate::reportAssertions(coll) @@ -53,7 +53,7 @@ for (conn in get_test_conns()) { until_ts = as.POSIXct(NA)), name = id("__mtcars_historical", conn), temporary = FALSE, overwrite = TRUE) - DBI::dbDisconnect(conn, shutdown = TRUE) + DBI::dbDisconnect(conn) } @@ -68,5 +68,5 @@ connection_clean_up <- function(conn) { if (nrow(dplyr::filter(get_tables(conn, show_temporary = TRUE), stringr::str_detect(.data$table, "^#?dbplyr_")))) { warning("Temporary dbplyr tables ('dbplyr_###') are not cleaned up!") } - DBI::dbDisconnect(conn, shutdown = TRUE) + DBI::dbDisconnect(conn) }