Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5412

Fix JRuby CI bug and address flaky test

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.0.1, 7.5.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Add retry_test to the following flaky mongoid test:

       1) Mongoid::Clients::Options.with when passing some options when passing a block when the options create a new cluster disconnects the new cluster when the block exits
        Failure/Error: expect(connections_after).to eq(connections_before)
             expected: 4
             got: 5
        (compared using ==)
      # ./spec/mongoid/clients/options_spec.rb:429:in `block (6 levels) in <top (required)>'
      # ./spec/lite_spec_helper.rb:74:in `block (3 levels) in <top (required)>'
      # ./spec/lite_spec_helper.rb:73:in `block (2 levels) in <top (required)>'
      

      Additionally the following JRuby test is failing because it is using be instead of eq:

      1) Mongoid::Config when discriminator_key override is not set in the config has the value _type by default
      Failure/Error: expect(Mongoid::Config.discriminator_key).to be("_type")
        expected #<String:60724> => "_type"
             got #<String:60728> => "_type"
        Compared using equal?, which compares object identity,
        but expected and actual are not the same object. Use
        `expect(actual).to eq(expected)` if you don't care about
        object identity in this example.
      # ./spec/mongoid/config_spec.rb:207:in `block in <main>'
      # ./spec/lite_spec_helper.rb:74:in `block in <main>'
      # ./spec/lite_spec_helper.rb:73:in `block in <main>'
      

            Assignee:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Reporter:
            neil.shweky@mongodb.com Neil Shweky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: