Test timespan recording behavior across app lifecycle
Categories
(Data Platform and Tools :: Glean: SDK, defect, P3)
Tracking
(Not tracked)
People
(Reporter: janerik, Unassigned)
Details
(Whiteboard: [telemetry:glean-rs:m8])
I don't think we have any test for that. At best we have a full integration test that handles the app lifecycle, but for now we might be able to emulate that behavior by properly resetting/re-initializing the metric.
| Reporter | ||
Comment 1•6 years ago
|
||
Actually, looking into this I think we might be fine.
If the app stops and then gets relaunched and only then calls stop, there's not gonna be a timer around and therefore only an error is logged.
Previously this is what I wanted to say:
Copying my commit message on why I think the timestamp currently works "by accident":
It's correct in that the timer gets deleted anyway on the first stop, it might have not been thought of when writing it that way though. The timespan metric keeps the timerId around, but the underlying timing manager deletes this ID.
Comment 2•6 years ago
|
||
This is already covered in the test here: https://github.com/mozilla-mobile/android-components/blob/master/samples/glean/src/androidTest/java/org/mozilla/samples/glean/pings/BaselinePingTest.kt
Description
•