[SERVER-46856] Sharding jstests should not use assert.throws and assert.doesNotThrow to check if a parallel shell exited with an error Created: 13/Mar/20 Updated: 29/Oct/23 Resolved: 23/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, sharding-interns-2020 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2020-06-15, Sharding 2020-06-29 |
| Participants: |
| Description |
|
For example, a syntax error in the JavaScript being built up and handed to --eval would manifest the same way to this assert.throws(). It's better to have the parallel shell itself assert whether it should have succeeded or failed, and to always have the parent mongo shell process assert the child process exits with code zero. Note that the moveChunkParallel() function already supports this with the `expectSuccess` parameter. |
| Comments |
| Comment by Githook User [ 23/Jun/20 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com'}Message: |