[SERVER-32369] Invariant incorrectly with message stringifies its argument Created: 15/Dec/17 Updated: 30/Oct/23 Resolved: 26/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.9, 3.7.1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Geert Bosch | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||
| Sprint: | Repl 2018-01-01 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
When testing an invariant with message by actually failing it, I noticed that the invariant includes the source code for the message expression rather than its contents:
This negates the objective of As this ticket shows, untested inactive code is likely to contain bugs. |
| Comments |
| Comment by Githook User [ 19/Sep/18 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: (cherry picked from commit 7cb2563388f77c7f0fea72811f512321f23096bd) |
| Comment by Githook User [ 19/Sep/18 ] |
|
Author: {'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com', 'username': 'smani87'}Message: (cherry picked from commit 9348c9f11174019ee1be93b25c3f44d070194472) |
| Comment by Githook User [ 26/Dec/17 ] |
|
Author: {'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}Message: |
| Comment by Githook User [ 26/Dec/17 ] |
|
Author: {'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}Message: |