[SERVER-22582] Wrap assert.soon bodies in try catch in replsettest.js Created: 11/Feb/16 Updated: 07/Sep/17 Resolved: 18/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.14, 3.3.2 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Judah Schvimer |
| Resolution: | Done | Votes: | 0 |
| Labels: | bkp | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.2
|
||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
Currently any exception in an assert.soon will cause a failure when we probably just want to retry, like in replsettest.js::awaitLastOpCommitted line:601. |
| Comments |
| Comment by Githook User [ 22/May/17 ] | ||||||
|
Author: {u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}Message: | ||||||
| Comment by Githook User [ 18/Feb/16 ] | ||||||
|
Author: {u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}Message: | ||||||
| Comment by Eric Milkie [ 11/Feb/16 ] | ||||||
|
For those function calls in replsettest.js that could throw exceptions, I agree they should be wrapped in try/catch's. | ||||||
| Comment by Scott Hernandez (Inactive) [ 11/Feb/16 ] | ||||||
|
I'm not suggesting we change assert.soon but only the uses in replSetTest.js. Also, we (unfortunately) already use assert.commandWorked when we really mean throwOnBadCommandResult:
| ||||||
| Comment by Eric Milkie [ 11/Feb/16 ] | ||||||
|
This would mean that any assert() call failure in an assert.soon would probably unintentionally break, since the programmer would expect the test to fail, not for the enclosing assert.soon to retry. |