Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1772416 - sleep in measure_associated_with_navigation_timing. r=s…
…efeng The root cause of the intermittent failure is that the test records one set of PerformanceMarks, records another, and verifies the duration of the measures of the second set are larger than the first set but they're unexpectedly equal. I speculate this happens because either the test executes fast enough that the clock doesn't increment or our precision reduction code (to mitigate against timing attacks) is rounding the before/after values to the same value. This solution is speculative because I was unable to reproduce the error locally so need to test it on WPT CI. The solution may fail intermittently if we don't sleep for long enough. A more correct solution to this problem would be to mock the clock and programmatically advance it but I didn't want to take the time. Another possible solution, that is stable, is to change the assertions to `test_greater_or_equal` but this could hide legitimate bugs, e.g. we accidentally return the same PerformanceMeasure for both queries. Differential Revision: https://phabricator.services.mozilla.com/D155420
- Loading branch information