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

Tests with mongocryptd operations fail with live background threads

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.0.rc0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            emily.giurleo Emily Giurleo
            Reporter:
            emily.giurleo Emily Giurleo
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: