-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
PR 1624 included this line, which registers the mongocryptd client as a local client during spec runs so that it is properly cleaned up once the tests are done:
This is not great because it includes testing details in the implementation.
When that line is not included, the tests fail because there are live background threads still running PeriodicExecutor and the server Monitor, even though the encryption client is being closed, which in turn closes the mongocryptd client.
Expected behavior is that closing the encryption client closes the mongocryptd client, which cleans up all encryption-related resources.