[Crashlyics] Address some Crashlytics flakes and disable others in nightly tests #15567
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
This PR should stabilize the Crashlytics unit tests after asking gemini to find and address several flaky tests. This PR doesn't touch the library itself other than exposing an additional property to the tests.
It also disables the flaky FIRCLSSettingsTests.m in nightly test runs.
This is a fresh start on #15551 which went too far with adding unnecessary churn and disabling some functionality.
This is an example of the common flake that will be suppressed in the nightly tests:
#no-changelog
Gemini's summary:
Summary of Changes
This pull request focuses on enhancing the stability and reliability of the Crashlytics unit test suite. It implements targeted fixes for existing flaky tests, such as improving file system interactions and cleanup procedures. Additionally, it introduces a configurable exclusion for certain flaky tests during nightly builds, aiming to prevent intermittent failures in automated pipelines. The changes also include minor refactoring to improve test code maintainability and thread safety in mock objects.
Highlights
Changelog