Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4180

Update tests to account for change to cursor behavior in MongoDB 5.0

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.12.9, 4.3.0
    • Affects Version/s: None
    • Component/s: Test Coverage
    • Labels:
      None

      With the switch to the slot-based execution engine (SBE) in the server cursor behaviour changed where a cursor is not closed automatically on the server side if the end of a batch returned in getMore lines up with a previously established limit on the cursor. The command monitoring tests (and subsequently the POC test that was converted as part of the unified test format project) test for this behaviour, with those tests failing on 5.0.

      Note that this command monitoring test is the only test that checks the behaviour defined in the "Find, getMore, and killCursors commands" specification, which requires drivers to make the last getMore batch size line up with limit, replicating the behaviour used for OP_GET_MORE. For that reason, I've duplicated the test and changed it for 5.0, and skipping the old test on 5.0 and newer. I'll create a separate drivers ticket to move the tests to the more appropriate location.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: