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

Update test unprojecting id in change stream on latest server

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0.rc0, 2.7.1
    • Affects Version/s: None
    • Component/s: Tests
    • None

      Unprojecting id in change streams is now a server error, we should update the test to expect OperationFailure on 4.2 while continuing to expect existing behavior on pre-4.2.

       1) ./spec/mongo/collection/view/change_stream_spec.rb[1:4:1]
      
      Mongo::Collection::View::ChangeStream when the first response does not contain the resume token raises an exception and closes the cursor
      
      RSpec::Expectations::ExpectationNotMetError: expected Mongo::Error::MissingResumeToken, got #<Mongo::Error::OperationFailure: Encountered an event whose _id field, which contains the resume tok...72281577084F0CA90D3EC448CE6EFC46645F696400645C6B021333E9B64A591BB8E70004" } } but found: {} (51059)> with backtrace:
        # ./lib/mongo/operation/result.rb:267:in `raise_operation_failure'
        # ./lib/mongo/operation/result.rb:263:in `validate!'
        # ./lib/mongo/operation/shared/executable.rb:26:in `execute'
        # ./lib/mongo/operation/shared/executable_transaction_label.rb:27:in `execute'
        # ./lib/mongo/operation/shared/op_msg_or_command.rb:27:in `execute'
        # ./lib/mongo/collection/view/change_stream.rb:323:in `send_initial_query'
        # ./lib/mongo/collection/view/change_stream.rb:267:in `create_cursor!'
        # ./lib/mongo/collection/view/change_stream.rb:134:in `rescue in each'
        # ./lib/mongo/collection/view/change_stream.rb:118:in `each'
      
      

            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: