[SERVER-57198] Update some tests not to use getLastError unless they target legacy functionality Created: 25/May/21  Updated: 29/Oct/23  Resolved: 02/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Irina Yatsenko (Inactive) Assignee: Irina Yatsenko (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-05-31, Query Execution 2021-06-14
Participants:

 Description   

We have many old tests that check success of a command-based operation by calling getLastError. We should update the test to use assert.commandWorked instead.

This ticket deals with:

jstests/auth/resource_pattern_matching.js
jstests/core/dropdb_race.js
jstests/multiVersion/genericSetFCVUsage/3_upgrade_replset.js
jstests/multiVersion/migration_between_mixed_version_mongods.js
jstests/multiVersion/minor_version_upgrade_replset.js
jstests/noPassthrough/geo_full.js
jstests/noPassthrough/indexbg1.js
jstests/noPassthrough/update_server-5552.js
jstests/sharding/read_pref_cmd.js
jstests/sharding/rename.js


 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Irina Yatsenko (Inactive) [ 02/Jun/21 ]

This ticket took care of a few simple cases, there will more coming.

Comment by Githook User [ 02/Jun/21 ]

Author:

{'name': 'Irina Yatsenko', 'email': 'irina.yatsenko@mongodb.com', 'username': 'IrinaYatsenko'}

Message: SERVER-57198 Remove getLastError calls from tests where it's easy to do so
Branch: master
https://github.com/mongodb/mongo/commit/911e585044f76bb244f425066bfcb838e9dfb258

Generated at Thu Feb 08 05:41:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.