-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
sleep calls in jstests are a simple, yet often problematic way to await a change of condition. Better options exists (such as fail points, or assert.soon with some condition like $currOp), but sleep is expedient and thus often chosen. As part of SERVER-79896 I used an eslint rule to prevent future load calls, and I think we could do something similar for sleep calls. Since we can provide a custom error message, we could point server engineers to a wiki page documenting alternate strategies for waiting and hopefully influence them not to use sleep