[SERVER-12203] bson_validate unit test needs some work Created: 24/Dec/13 Updated: 27/Jun/22 Resolved: 07/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben Shteinfeld | Assignee: | Ben Shteinfeld |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng, platforms-interns-2017 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Platforms 2017-06-19 |
| Participants: |
| Description |
|
Many of the tests compare the output of BSONObj::valid() with validateBSON under the assumption that they are different implementations[1]. This assumption was invalidated when BSONObj::valid was reimplemented as a thin wrapper around validateBSON[2]. This makes the current tests the equivalent of ASSERT_EQUALS(validateBSON(), validateBSON()) which isn't really testing anything. [1] https://github.com/mongodb/mongo/blob/master/src/mongo/bson/bson_validate_test.cpp#L156-158 |
| Comments |
| Comment by Githook User [ 07/Jun/17 ] |
|
Author: {u'username': u'bshteinfeld', u'name': u'Ben Shteinfeld', u'email': u'ben.shteinfeld@mongodb.com'}Message: |