Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-80141

Reduce usage of sleep statements in jstests

    • 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

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: