Bug 1638276 [wpt PR 23629] - sensors: Call GenericSensorTest.reset() in a cleanup...
commit6a451e25ef630178879064332d1c5b053fe4ba0e
authorRaphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Thu, 21 May 2020 10:23:22 +0000 (21 10:23 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 25 May 2020 14:33:12 +0000 (25 14:33 +0000)
treef69b416ba3fa255479a4c42087b2e5d011fda808
parent82eba5c29fd5e45a78dd530ce6549113c0884414
Bug 1638276 [wpt PR 23629] - sensors: Call GenericSensorTest.reset() in a cleanup function., a=testonly

Automatic update from web-platform-tests
sensors: Call GenericSensorTest.reset() in a cleanup function.

This addresses some of the flakiness in the sensors tests, in addition to
helping make it easier to find other sources of flakiness.

Instead of calling GenericSensorTest.reset() in a `finally` clause, use
t.add_cleanup() instead. The latter's behavior is more deterministic (see
https://github.com/web-platform-tests/wpt/pull/17924), and fixes an issue
where an EventWatcher would fail an assertion when receiving an unexpected
event, and GenericSensorTest.reset() would either not be called or called
after other tests had already started running.

Bug: 731018
Change-Id: Ifbb95b8067b153b70ecb3e6509f476164afd022e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2203378
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#769442}

--

wpt-commits: e909362eb429426f97d3c8731855075de9def0b2
wpt-pr: 23629
testing/web-platform/tests/generic-sensor/resources/generic-sensor-helpers.js
testing/web-platform/tests/orientation-event/resources/orientation-event-helpers.js