-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Tests
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When we are testing SDAM, it is important to not have background threads from global clients and clients created by previously executing tests get in the way of the current test. This requires at a minimum suspending background monitoring of all outstanding clients. As there is utility in sharing client instances between tests, this ticket proposes to:
1. Add a global registry (glorified array) of mongo clients.
2. Replace all Mongo::Client.new calls with a helper invocation that adds the created client to the registry.
3. Add a helper method that kills background monitoring threads of all active clients. I believe calling `disconnect` would accomplish this.
4. Adds a helper method that reinstates background monitoring threads, such as by calling `reconnect`.
This also paves way for automatically cleaning up all clients created by individual test cases, if we mark the global clients specially.
- is related to
-
RUBY-1455 Investigate Client#with/monitoring interactions
-
- Closed
-