Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2069

Tests with mongocryptd operations fail with live background threads

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.12.0.rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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:

      https://github.com/mongodb/mongo-ruby-driver/pull/1624/files#diff-d8c5cdedb467328e512a4fbd458770d5R82

      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.

            Assignee:
            emily.giurleo@mongodb.com Emily Giurleo (Inactive)
            Reporter:
            emily.giurleo@mongodb.com Emily Giurleo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: