Closed Bug 1528023 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 15375 - ensure sleep_at_least is guaranteed to sleep for the requested duration

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 15375 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/15375
Details from upstream follow.

Erik Anderson <Erik.Anderson@microsoft.com> wrote:

ensure sleep_at_least is guaranteed to sleep for the requested duration

Microsoft runs tests in a Hyper-V VM. The test external/wpt/resource-timing/resource-timing-level1.sub.html leverages wptserve's SyntheticResponse.py to request that each step of a response is delayed by 250ms. In our environment, even with the extra 15ms "padding" in sleep.py, we're seeing the timer return 5ms early which in turn causes the test to fail. This change updates the sleep_at_least function to, in a loop, explicitly check that it slept long enough and, if not, sleep again for a short interval.

Change-Id: I2dbd8e6bd586dc661b45f94454d3b6b4613db1a5
Reviewed-on: https://chromium-review.googlesource.com/1469655
WPT-Export-Revision: 462c87d7b784c0a0fe54484e08acd26c21b0f38d

Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/78d3aefc4418
[wpt PR 15375] - ensure sleep_at_least is guaranteed to sleep for the requested duration, a=testonly
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c673e6572713
[wpt PR 15375] - ensure sleep_at_least is guaranteed to sleep for the requested duration, a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.