This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 80f87b3f fix(r/adbcsqlite): Fix incomplete cleanup in adbcsqlite tests 
(#1219)
80f87b3f is described below

commit 80f87b3f0897e7a51d687be0a00409b5158a9cc1
Author: Dewey Dunnington <[email protected]>
AuthorDate: Mon Oct 23 21:32:23 2023 +0000

    fix(r/adbcsqlite): Fix incomplete cleanup in adbcsqlite tests (#1219)
    
    Closes #1211.
    
    It wasn't an external pointer issue, it was just not cleaning up
    properly in some tests. These tests were written before `with_adbc()`
    and `local_adbc()`...the tests for all the drivers could be refactored
    to use them (but perhaps not today).
---
 r/adbcsqlite/tests/testthat/test-adbcsqlite-package.R | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/r/adbcsqlite/tests/testthat/test-adbcsqlite-package.R 
b/r/adbcsqlite/tests/testthat/test-adbcsqlite-package.R
index 5e4e9cf6..fc61db74 100644
--- a/r/adbcsqlite/tests/testthat/test-adbcsqlite-package.R
+++ b/r/adbcsqlite/tests/testthat/test-adbcsqlite-package.R
@@ -93,7 +93,10 @@ test_that("read/write/execute SQL work with sqlite 
connections", {
 
   stream <- adbcdrivermanager::read_adbc(con, "SELECT * from df")
   expect_identical(as.data.frame(stream), data.frame(x = as.double(3:12)))
+
   stream$release()
+  adbcdrivermanager::adbc_connection_release(con)
+  adbcdrivermanager::adbc_database_release(db)
 })
 
 test_that("write_adbc() with temporary = TRUE works with sqlite databases", {
@@ -118,4 +121,7 @@ test_that("write_adbc() with temporary = TRUE works with 
sqlite databases", {
     adbcdrivermanager::read_adbc(con, "SELECT * from df"),
     class = "adbc_status_invalid_argument"
   )
+
+  adbcdrivermanager::adbc_connection_release(con)
+  adbcdrivermanager::adbc_database_release(db)
 })

Reply via email to