[SERVER-73480] Add some way to automatically wrap all db commands in "assert.commandWorked" in jstests Created: 31/Jan/23  Updated: 23/Oct/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Ted Tuckman Assignee: [DO NOT ASSIGN] Backlog - DevProd Correctness
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Correctness
Participants:

 Description   

Currently tests must manually wrap all db commands in an assertion to avoid failures that can be hard to diagnose if a command silently fails. Being able to opt in (or assume it is wanted if no assert.commandWorked calls are present) to automatic wrapping would be very useful.



 Comments   
Comment by Ted Tuckman [ 08/Feb/23 ]

Most jstests wrap (or should wrap) every command in an assertion (random example). Many of the passthroughs add options to commands/ mutate commands in some ways, it seemed like it would make sense to have something that could do the same to commands that are missing assertions in certain directories.

Comment by Iryna Zhuravlova [ 07/Feb/23 ]

Hi ted.tuckman@mongodb.com can you please give us examples of when you are seeing this? 

Generated at Thu Feb 08 06:24:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.