Provide time.sleep() in the time recipe module |
|||
Issue descriptionWe've recently found a use-case (polling inside of a recipe) for which having sleep() be available in the time recipe module would be useful. Polling inside of a recipe isn't good, and inserting sleep calls isn't good either, but it but for now it's a reasonable solution until we figure out the appropriate place to poll (FWIW, we're polling gerrit from our auto-roller). Testing without a mockable sleep is hard, since you have to pass potentially small numbers to sleep hoping it won't impact testing.
,
Feb 3 2018
,
Feb 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/infra/luci/recipes-py/+/8f09f5f2571c4ec5b22269eb44e53742dfae29fb commit 8f09f5f2571c4ec5b22269eb44e53742dfae29fb Author: Michael Anthony Knyszek <mknyszek@google.com> Date: Tue Feb 06 01:01:11 2018 Add sleep to the time recipe module This change adds a testable 'sleep' method to the time recipe module. Bug: 807506 Change-Id: Iffd9b1cd97c3836b7aef83cf5fc9b213e26ca80f Reviewed-on: https://chromium-review.googlesource.com/894691 Commit-Queue: Michael Knyszek <mknyszek@google.com> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Vadim Shtayura <vadimsh@chromium.org> [modify] https://crrev.com/8f09f5f2571c4ec5b22269eb44e53742dfae29fb/recipe_modules/time/api.py [modify] https://crrev.com/8f09f5f2571c4ec5b22269eb44e53742dfae29fb/README.recipes.md [modify] https://crrev.com/8f09f5f2571c4ec5b22269eb44e53742dfae29fb/recipe_modules/time/examples/full.py
,
Apr 27 2018
This was fixed by my change some time ago. Closing... |
|||
►
Sign in to add a comment |
|||
Comment 1 by tandrii@chromium.org
, Feb 2 2018Status: Assigned (was: Untriaged)