File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
lib/active_record/connection_adapters
spec/active_record/connection_adapters/oracle_enhanced Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ def reconnect
467
467
end
468
468
469
469
# Reconnects to the database.
470
- def reconnect! # :nodoc:
470
+ def reconnect! ( restore_transactions : false ) # :nodoc:
471
471
super
472
472
_connection . reset!
473
473
rescue OracleEnhanced ::ConnectionException => e
Original file line number Diff line number Diff line change 30
30
expect ( ActiveRecord ::Base . connection ) . to be_active
31
31
end
32
32
33
+ it "should be active after reconnection to database with restore_transactions: true" do
34
+ ActiveRecord ::Base . establish_connection ( CONNECTION_PARAMS )
35
+ ActiveRecord ::Base . connection . reconnect! ( restore_transactions : true )
36
+ expect ( ActiveRecord ::Base . connection ) . to be_active
37
+ end
38
+
33
39
it "should use database default cursor_sharing parameter value force by default" do
34
40
# Use `SYSTEM_CONNECTION_PARAMS` to query v$parameter
35
41
ActiveRecord ::Base . establish_connection ( SYSTEM_CONNECTION_PARAMS )
You can’t perform that action at this time.
0 commit comments