Bad interaction between specs leads to failing FLE specs when all specs are run together

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running all specs together (e.g. rake spec), with FLE enabled, two specs in the database_rake_spec.rb file fail with a cryptic error about the "encrypted" client not being defined.

      This can be narrowed down to the following minimal case:

       

      shell> FLE=helper rspec spec/integration/encryption_spec.rb spec/mongoid/clients/options_spec.rb spec/mongoid/tasks/database_rake_spec.rb

      The error apparently happens because the encryption_spec.rb sets up an "encrypted" client, and then options_spec.rb clears all clients, but must be leaving something behind so that when database_rake_spec.rb runs, it gets confused and fails.

      For now, this is worked around by using rake ci (which isolates the specs a bit better) instead of rake spec, but it would be better to clean up the specs eventually so that we don't leak side-effects like this.

              Assignee:
              Unassigned
              Reporter:
              Jamis Buck
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: