[JAVA-4180] Update tests to account for change to cursor behavior in MongoDB 5.0 Created: 27/May/21  Updated: 28/Oct/23  Resolved: 01/Jun/21

Status: Closed
Project: Java Driver
Component/s: Test Coverage
Affects Version/s: None
Fix Version/s: 3.12.9, 4.3.0

Type: Improvement Priority: Unknown
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

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.



 Comments   
Comment by Jeffrey Yemin [ 27/May/21 ]

Blocked on final set of tests from DRIVERS-1781

Comment by Githook User [ 27/May/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Update command monitoring test

Ignore cursor test starting with 5.0 server, as expectations have changed
slightly for the behavior of cursors.

JAVA-4180
Branch: 3.12.x
https://github.com/mongodb/mongo-java-driver/commit/7677bc902f36ba5863ccfc42ccd056ca73a62542

Comment by Githook User [ 27/May/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Update command monitoring test

Ignore cursor test starting with 5.0 server, as expectations have changed
slightly for the behavior of cursors.

JAVA-4180
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/5aac83954db24e2d19ebb76a940f05b1e664c081

Comment by Githook User [ 27/May/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Update unified format command monitoring test

Ignore cursor test starting with 5.0 server, as expectations have changed
slightly for the behavior of cursors.

JAVA-4180
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/0a593092f0341ba393dbf4dd61203e117f425e4a

Generated at Thu Feb 08 09:01:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.