[CDRIVER-1888] mock server should abort when it detects duplicate BSON fields Created: 28/Oct/16  Updated: 09/Jan/18  Resolved: 30/Oct/17

Status: Closed
Project: C Driver
Component/s: libmongoc, tests
Affects Version/s: None
Fix Version/s: 1.9.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We'd have caught CDRIVER-1871 and a few other bugs if the mock server always aborted when the client sent it a BSON document containing multiple values for the same key.



 Comments   
Comment by Githook User [ 09/Jan/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-1888 test for duplicate fields in subdocs

The mock server aborts if it detects the client has sent it a command
with duplicate field names, to catch a common type of subtle bug. Now,
it also recursively checks subdocuments.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/77aaccca430d22df0f80832186faf6dddc10e235

Comment by Githook User [ 31/Oct/17 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-1888 mock server detects duplicate keys, try 2

This reverts commit 5d880a361719df91aa5414418ee61ddcaba5a0b2.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/c5c487c53345cacb1ddcbc56646d92680df2f71b

Comment by A. Jesse Jiryu Davis [ 30/Oct/17 ]

Fixed, now that sessions, $clusterTime, and OP_MSG work has fixed the duplicate-field issues.

Comment by A. Jesse Jiryu Davis [ 22/Jul/17 ]

Test fails at the moment.

Comment by Githook User [ 22/Jul/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: Revert "CDRIVER-1888 mock server detects duplicate keys"

83f47385e67ce7cc691699b8145452e10cb5bf0c

Test fails at the moment.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/5d880a361719df91aa5414418ee61ddcaba5a0b2

Comment by Githook User [ 21/Jul/17 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1888 mock server detects duplicate keys
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/83f47385e67ce7cc691699b8145452e10cb5bf0c

Generated at Wed Feb 07 21:13:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.