-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Refer to https://github.com/mongodb/mongoid/pull/5597/files
There is a spec in the file spec/mongoid/clients/options_spec.rb that makes an assertion about the number of DB connections, by asking the DB for the number of connections it has.
The spec is set to retry 3 times (a red flag that it's janky) and even with these retries, it still fails about 1 out of every 10 times. Its easy to repro locally using 100.times { } around the spec.
The PR, I've made a fix which preserves the spirit of the test in the way that doesn't fail--ran it 1000 times without retries and it worked every time.