diff options
Diffstat (limited to 'lib/gitlab/database/postgresql_adapter')
-rw-r--r-- | lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb b/lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb index 71d2554844e..21392283ccf 100644 --- a/lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb +++ b/lib/gitlab/database/postgresql_adapter/force_disconnectable_mixin.rb @@ -11,6 +11,8 @@ module Gitlab end def force_disconnect_if_old! + return if Rails.env.test? && transaction_open? + if force_disconnect_timer.expired? disconnect! reset_force_disconnect_timer! |