Thank you, :nordzilla, for [catching a failure in action with logging enabled](https://treeherder.mozilla.org/logviewer?job_id=460551757&repo=try&lineNumber=15148-15657). This log shows evidence consistent with my hypothesis: the event ping is sent on line 15323 due to a `user-interaction-inactive` being received after more than 2mins of "user activity" due to previous tests. This happens _after_ the `open` event is recorded but before its presence is asserted, which is some wickedly bad luck. This also explains why it doesn't happen locally: running locally we don't give it ten minutes per run. Not enough time to grow idle, or if it becomes idle it's after too short of an active period to trigger the "events" ping (which shares [the "baseline" pings schedule](https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/builtin_pings.html)). We can paper over this failure immediately with a `Services.obs.notifyObservers("user-interaction-inactive");` at the beginning of this test (triggers the "events" ping early, or avoids triggering it at all. Both are acceptable), or by doing what we did in bug 1690728 and giving `dom.events.user_interaction_interval` a value in excess of the length the app is open (meaning EventStateManager won't ever claim the user's gone active or idle for the duration). Either will ensure the "events" ping will not be sent during the test. A more appropriate (less hacky) solution is being pursued in bug 1900085, so if we go that route in the meantime please do leave a note there (and reference the bug number in a comment next to the hack) so we can undo it later.
Bug 1898598 Comment 15 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Thank you, :nordzilla, for [catching a failure in action with logging enabled](https://treeherder.mozilla.org/logviewer?job_id=460551757&repo=try&lineNumber=15148-15657). This log shows evidence consistent with my hypothesis: the event ping is sent on line 15323 due to a `user-interaction-inactive` being received after more than 2mins of "user activity" due to previous tests. This happens _after_ the `open` event is recorded but before its presence is asserted, which is some wickedly bad luck. This also explains why it doesn't happen locally: running locally we don't give it ten minutes per run. Not enough time to grow idle, or if it becomes idle it's after too short of an active period to trigger the "events" ping (which shares [the "baseline" pings schedule](https://firefox-source-docs.mozilla.org/toolkit/components/glean/dev/builtin_pings.html)). We can paper over this failure immediately with a `Services.obs.notifyObservers("user-interaction-inactive");` at the beginning of this test (triggers the "events" ping early, or avoids triggering it at all. Both are acceptable), or by doing what we did in bug 1690728 and giving `dom.events.user_interaction_interval` a value in excess of the length the app is open (meaning EventStateManager won't ever claim the user's gone active or idle for the duration). Either will ensure the "events" ping will not be sent during the test. A more appropriate (less hacky) solution is being pursued in bug 1900085, so if we go one of those above routes in the meantime please do leave a note there (and reference the bug number in a comment next to the hack) so we can undo it later.