Skip to content

Commit

Permalink
RUBY-2820 use session registry from mrss (#5173)
Browse files Browse the repository at this point in the history
* RUBY-2820 use mrss session_registry

* RUBY-2820 include old session registry

* RUBY-2820 update version check

* remove unnecessary spacing
  • Loading branch information
Neilshweky authored and p committed Jul 19, 2022
1 parent 5d80e8e commit d277173
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 54 deletions.
9 changes: 8 additions & 1 deletion spec/lite_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@

require 'support/spec_config'
require 'mrss/lite_constraints'
require "support/session_registry"

if Gem::Version.new(Mongo::VERSION) < Gem::Version.new('2.18.0.alpha')
require "mrss/session_registry_legacy"
else
require "mrss/session_registry"
end

Mrss.patch_mongo_for_session_registry

unless SpecConfig.instance.ci?
begin
Expand Down
4 changes: 2 additions & 2 deletions spec/mongoid/query_cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# occur only within the scope of these tests.
#
# Other session leaks will be detected and addressed as part of RUBY-2391.
SessionRegistry.instance.clear_registry
Mrss::SessionRegistry.instance.clear_registry
end

after do
SessionRegistry.instance.verify_sessions_ended!
Mrss::SessionRegistry.instance.verify_sessions_ended!
end

let(:reset_legacy_qc_warning) do
Expand Down
2 changes: 1 addition & 1 deletion spec/shared
50 changes: 0 additions & 50 deletions spec/support/session_registry.rb

This file was deleted.

0 comments on commit d277173

Please sign in to comment.