Closed Bug 1253831 Opened 5 years ago Closed 4 years ago

Intermittent test_retry_ws.js | test_ws_retry - [test_ws_retry : 67] Should wait at least 10000ms before attempt 10 - false == true

Categories

(Core :: DOM: Push Notifications, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox47 --- fixed
firefox48 --- fixed

People

(Reporter: philor, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Probably the most-frequent Push-related intermittent failure left now.
Flags: needinfo?(wchen)
Hmm. We probably don't need to be this pedantic about the backoff intervals: https://dxr.mozilla.org/mozilla-central/rev/b3006e4e09af81825badbad69fa3e8c546c7507c/dom/push/test/xpcshell/test_retry_ws.js#66-69

Should we just check that the timeout we set (not when the timer actually fired) is within bounds?
Attached patch backoff.patchSplinter Review
Does this seem sensible, William?
Flags: needinfo?(wchen)
Attachment #8732560 - Flags: review?(wchen)
Comment on attachment 8732560 [details] [diff] [review]
backoff.patch

Review of attachment 8732560 [details] [diff] [review]:
-----------------------------------------------------------------

Yes, this seems reasonable. We can also go a step further and mock out the timer at the component level (see [1] for example) to further isolate the test from the clock. As a side effect, the tests would run faster since we wouldn't have to wait on the timer.

[1] https://dxr.mozilla.org/mozilla-central/rev/4037eb98974db1b1e0b5012c8a7f3a36428eaa11/toolkit/components/places/tests/expiration/test_pref_interval.js#51
Attachment #8732560 - Flags: review?(wchen) → review+
https://hg.mozilla.org/mozilla-central/rev/69b9c67c96ec
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.