[SERVER-43748] Convenient synchronization between tests and failpoints Created: 01/Oct/19 Updated: 06/Dec/22 Resolved: 01/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | DO NOT USE - Backlog - Dev Tools |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Developer Tools
|
||||||||
| Participants: | |||||||||
| Description |
|
Frequently, tests must do something like:
Today we do this by manually adding a log line to the C++ code like:
Then in Javascript we use the checkLog mechanism to wait for that log message to appear. This is prone to various errors:
It would be awesome if we had a better mechanism for synchronizing tests with failpoints. I propose something approximately like:
Then in jsTests:
If "wait" is true, the command first changes the failpoint's mode, then waits for the next call to signal() before returning. If the mechanism were this convenient I think we would use it more consistently and with fewer mistakes. |
| Comments |
| Comment by Esha Maharishi (Inactive) [ 02/Oct/19 ] |
|
Yep, also it would be nice if you could wait for the failpoint to be hit separately from hitting it, but I am hugely in support of adding better synchronization around this – Edit – Oh, didn't see it had already been closed as a dupe. |
| Comment by William Schultz (Inactive) [ 01/Oct/19 ] |
|
Possibly similar to SERVER-42308, |