Closed Bug 1566384 Opened 6 years ago Closed 6 years ago

Test timespan recording behavior across app lifecycle

Categories

(Data Platform and Tools :: Glean: SDK, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

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.

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.

Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m8]
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.