[SERVER-32393] assert.neq() does shallow inequality check for objects Created: 18/Dec/17  Updated: 30/Oct/23  Resolved: 20/Feb/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: David Bradford (Inactive)
Resolution: Fixed Votes: 1
Labels: tig-assertjs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-32353 Inequality check in update_affects_in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: TIG 2018-02-26
Participants:

 Description   

The assert.neq() function is implemented using Javascript !=, which performs reference inequality for objects. This is different from assert.eq(), which performs a deep comparison if the operands have unequal references. This leads to confusion in jstests, since we would expect assert.neq() to throw iff assert.eq() does not throw.



 Comments   
Comment by Githook User [ 20/Feb/18 ]

Author:

{'email': 'david.bradford@mongodb.com', 'name': 'David Bradford', 'username': 'dbradf'}

Message: SERVER-32393 Use same comparison for eq and neq assertions
Branch: master
https://github.com/mongodb/mongo/commit/13b35bc5cfb20be89eb46dc50208d344caf305bb

Comment by Max Hirschhorn [ 31/Dec/17 ]

Max Hirschhorn does TIG have time to pick this up in 3.7?

ian.whalen, I would say so.

Comment by Ian Whalen (Inactive) [ 21/Dec/17 ]

max.hirschhorn does TIG have time to pick this up in 3.7?

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