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

app_metadata_shared is being overwritten

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.15.0
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • Fully Compatible

      serene2% TOPOLOGY=load-balanced MONGODB_URI=mongodb://localhost:14748'/?loadBalanced=true&connect=load_balanced' bs spec/mongo/server/app_metadata_s*
      [mongo] Warning: No private key present, creating unsigned gem.
      WARNING: Shared example group 'app metadata document' has been previously defined at:
        /home/w/apps/ruby-driver/spec/mongo/server/app_metadata_shared.rb:4
      ...and you are now defining it at:
        /home/w/apps/ruby-driver/spec/mongo/server/app_metadata_shared.rb:4
      The new definition will overwrite the original one.
                                                                                                                   
        1) Mongo::Server::AppMetadata#document behaves like app metadata document linux includes operating system information
           Failure/Error: document[:client][:os][:name].should == 'linux-gnu'
           
             expected: "linux-gnu"
                  got: "linux" (using ==)
           Shared Example Group: "app metadata document" called from ./spec/mongo/server/app_metadata_spec.rb:153
           # ./spec/mongo/server/app_metadata_shared.rb:26:in `block (3 levels) in <top (required)>'
           # ./spec/support/background_thread_registry.rb:65:in `block (2 levels) in <top (required)>'
      
      WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives, since literally any other error would cause the expectation to pass, including those raised by Ruby (e.g. NoMethodError, NameError and ArgumentError), meaning the code you are intending to test may not even get reached. Instead consider using `expect { }.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`. This message can be suppressed by setting: `RSpec::Expectations.configuration.on_potential_false_positives = :nothing`. Called from /home/w/apps/ruby-driver/spec/mongo/server/app_metadata_spec.rb:166:in `block (3 levels) in <top (required)>'.
       24/24 |======================================= 100 =======================================>| Time: 00:00:00 
      
      Finished in 0.07875 seconds (files took 0.26268 seconds to load)
      24 examples, 1 failure, 3 pending
      
      Failed examples:
      
      rspec ./spec/mongo/server/app_metadata_shared.rb:21 # Mongo::Server::AppMetadata#document behaves like app metadata document linux includes operating system information
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: