Skip to content

Commit

Permalink
trycatch for connections
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov committed Jul 16, 2024
1 parent c8fa6bc commit 667f735
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/ConnectionHandler.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ ConnectionHandler <- R6::R6Class(
closeConnection = function() {
if (self$dbIsValid()) {
ParallelLogger::logInfo("Closing database connection")
DatabaseConnector::disconnect(self$con)
# This throws exception in unit tests in unit tests on mac os in github actions
tryCatch(DatabaseConnector::disconnect(self$con),
error = function(...) {})
}
self$isActive <- FALSE
self$con <- NULL
Expand Down

0 comments on commit 667f735

Please sign in to comment.