Bug 1934931 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

With the changes in Glean v63.0.0, custom pings need to be registered/instantiated before tests, otherwise you cannot record data on them. The GleanTestRule doesn't really allow for this and so within Application-Services, the sync telemetry pings were breaking in tests that relied on the `GleanTestRule`

We should improve it to be able to work with this use-case or provide some other mechanism than manually needing to do all the things it does for consumers.
With the changes in Glean v63.0.0, custom pings need to be registered/instantiated before Glean is initialized, otherwise you cannot record data on them. 

On Android, the GleanTestRule doesn't really allow for this and so it isn't possible to use it with tests involving custom pings or data on those pings.

On Desktop, crashreporter requires touching the generated ping instance prior to init also.

On iOS, we don't have a GleanTestRule, but it still required activating the pings by calling `registerPings`

We should investigate if we can instantiate these pings within Glean or the ping instances in a way that avoids this extra integration code which could lead to obscure failures that are difficult to debug.

Back to Bug 1934931 Comment 0