Skip to content

Commit 3f67ea4

Browse files
authored
RUBY-2820 use session registry from mrss (#5173)
* RUBY-2820 use mrss session_registry * RUBY-2820 include old session registry * RUBY-2820 update version check * remove unnecessary spacing
1 parent 348edf6 commit 3f67ea4

File tree

4 files changed

+11
-54
lines changed

4 files changed

+11
-54
lines changed

spec/lite_spec_helper.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818

1919
require 'support/spec_config'
2020
require 'mrss/lite_constraints'
21-
require "support/session_registry"
21+
22+
if Gem::Version.new(Mongo::VERSION) < Gem::Version.new('2.18.0.alpha')
23+
require "mrss/session_registry_legacy"
24+
else
25+
require "mrss/session_registry"
26+
end
27+
28+
Mrss.patch_mongo_for_session_registry
2229

2330
unless SpecConfig.instance.ci?
2431
begin

spec/mongoid/query_cache_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
# occur only within the scope of these tests.
1818
#
1919
# Other session leaks will be detected and addressed as part of RUBY-2391.
20-
SessionRegistry.instance.clear_registry
20+
Mrss::SessionRegistry.instance.clear_registry
2121
end
2222

2323
after do
24-
SessionRegistry.instance.verify_sessions_ended!
24+
Mrss::SessionRegistry.instance.verify_sessions_ended!
2525
end
2626

2727
let(:reset_legacy_qc_warning) do

spec/support/session_registry.rb

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)