[DRIVERS-1828] Remove insertedCount from insert result assertions and improve usage of $$unsetOrMatches Created: 01/Jul/21  Updated: 15/Jul/22  Resolved: 15/Jul/22

Status: Closed
Project: Drivers
Component/s: CRUD, Unified Test Runner
Fix Version/s: None

Type: Spec Change Priority: Unknown
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Done Votes: 0
Labels: test-runner, yaml-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Issue split
split to PYTHON-2794 Remove insertedCount from insert resu... Closed
split to CDRIVER-4051 Remove insertedCount from insert resu... Closed
split to JAVA-4220 Remove insertedCount from insert resu... Closed
split to NODE-3398 Remove insertedCount from insert resu... Closed
split to PHPLIB-665 Mitigate pain of using field names wi... Closed
split to RUBY-2528 Permit inserting dollar-prefixed or d... Closed
Related
Driver Changes: Needed
Driver Compliance:
Key Status/Resolution FixVersion
SWIFT-1107 Fixed bson-3.0.2, 1.2.0
MOTOR-668 Duplicate
RUST-665 Fixed 2.0.0-beta.3
PHPLIB-665 Fixed 1.9.0
RUBY-2528 Fixed 2.18.0
CXX-2186 Fixed 3.7.0
CSHARP-3399 Fixed 2.13.0
GODRIVER-1870 Done 1.6.0
CDRIVER-4051 Fixed 1.18.0
PYTHON-2794 Fixed 3.12, 4.0
NODE-3398 Done
JAVA-4220 Fixed 4.4.0

 Description   

Drivers should sync tests in crud/unified and unified-test-format/tests/valid-pass with 44f8310.


Spec tests for DRIVERS-1237 inadvertently added insertedCount to insert one/many result assertions, despite that never being a documented field in the CRUD spec. The field was removed in fc21cb7 (associated with DRIVERS-1237) for insertOne operations but that commit neglected to also remove it for insertMany. Since various language tickets have already been closed, this new ticket will be used to track the remaining changes.

Additionally, this ticket will address instances where $$unsetOrMatches should have been used in test files (e.g. BulkWriteResult reported through BulkWriteException, entire InsertOneResult and InsertManyResult objects). This was originally done in some test files (e.g. poc-session.yml) in e4808b8 (original commit for DRIVERS-709), but missed in subsequent tests.



 Comments   
Comment by Jeremy Mikola [ 02/Jul/21 ]

esha.bhargava / alexander.golin: Please create language tickets for CDRIVER, JAVA, NODE, and PYTHON. I linked up any existing language tickets from DRIVERS-1237 that were not yet resolved.

Comment by Githook User [ 02/Jul/21 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: DRIVERS-1828: Remove insertedCount and improve use of $$unsetOrMatches (#1034)
Branch: master
https://github.com/mongodb/specifications/commit/44f83106033a609f2af40e3e4d99852a03096ba5

Comment by Jeremy Mikola [ 01/Jul/21 ]

https://github.com/mongodb/specifications/pull/1034

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