Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Foryś <adam.forys@gmail.com>
  • Loading branch information
krlmlr and galachad authored Dec 12, 2021
1 parent a217c9b commit 506ab86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/PqConnection.R
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ postgresWaitForNotify <- function (conn, timeout = 1) {
#' [DBI::dbConnect()]
#' @return A boolean, indicating if a transaction is ongoing.
postgresIsTransacting <- function(conn) {
connection_is_transacting(conn)
connection_is_transacting(conn@ptr)
}

#' Determine database type for R vector.
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-isTransacting.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ context("isTransacting")
test_that("isTransacting detects transactions correctly", {
skip_on_cran()
db <- postgresDefault()
expect_fale(postgresIsTransacting(con))
expect_false(postgresIsTransacting(con))
dbBegin(con)
expect_true(postgresIsTransacting(con))
dbCommit(con)
expect_fale(postgresIsTransacting(con))
expect_false(postgresIsTransacting(con))
})

0 comments on commit 506ab86

Please sign in to comment.