[DRIVERS-2237] Fix find-comment specs Created: 18/Mar/22  Updated: 27/Oct/23  Resolved: 18/Mar/22

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

Type: Improvement Priority: Unknown
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to CDRIVER-4314 Fix find-comment specs Closed
split to CSHARP-4103 Fix find-comment specs Closed
split to CXX-2471 Fix find-comment specs Closed
split to GODRIVER-2338 Fix find-comment specs Closed
split to JAVA-4538 Fix find-comment specs Closed
split to MOTOR-914 Fix find-comment specs Closed
split to NODE-4097 Fix find-comment specs Closed
split to PHPLIB-817 Fix find-comment specs Closed
split to PYTHON-3177 Fix find-comment specs Closed
split to RUBY-2929 Fix find-comment specs Closed
split to RUST-1224 Fix find-comment specs Closed
Related
is related to DRIVERS-742 Add support for the comment field to ... Closed
Driver Changes: Needed
Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4314 Works as Designed
CXX-2471 Works as Designed
CSHARP-4103 Works as Designed
GODRIVER-2338 Works as Designed
JAVA-4538 Works as Designed
NODE-4097 Works as Designed
MOTOR-914 Works as Designed
PYTHON-3177 Works as Designed
PHPLIB-817 Works as Designed
RUBY-2929 Works as Designed
RUST-1224 Works as Designed
SWIFT-1524 Works as Designed

 Description   

Summary

DRIVERS-742 Added comment for operators. In the find-comment tests, the expected result does not match the actual results and according to evaluating matches:

if expected is not the root document:
assert that actual does not contain additional keys

When implementing the feature the Java driver unified test runner failed as the actual document had an extra value.

Is this issue urgent?

No. It might be easier to implement this together with DRIVERS-742, but this is not required.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Ross Lawley [ 18/Mar/22 ]

Apologies - the tests are correct as is:

Extra fields in Actual Documents

When comparing actual and expected documents, drivers should permit actual documents to contain additional fields not present in expected. For example, the following documents match:

expected is

Unknown macro: { "x"}

actual is { "_id":

Unknown macro: { "$oid" }

, "x": 1 }

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