Skip to content

Bugfix FXIOS-15822 [Unit Test] fix top sites#33844

Closed
cyndichin wants to merge 1 commit into
mainfrom
cc/FXIOS-15822_flaky-top-sites
Closed

Bugfix FXIOS-15822 [Unit Test] fix top sites#33844
cyndichin wants to merge 1 commit into
mainfrom
cc/FXIOS-15822_flaky-top-sites

Conversation

@cyndichin

@cyndichin cyndichin commented May 15, 2026

Copy link
Copy Markdown
Contributor

📜 Tickets

Jira ticket
Github issue

💡 Description

We started seeing new failures related to our TopSitesHelperTests:
testGetTopSites_removesDuplicates and testGetTopSites_withError_completesWithZeroSites

Pulling the crash logs from the artifacts, the stack trace looks very similar to the issue faced in this PR: https://github.com/mozilla-mobile/firefox-ios/pull/33619/changes

The test is crashing due to a dependency injection failure when trying to resolve the FeatureFlagsProvider. The crash occurs during test teardown when TopSitesProviderImplementation tries to access feature flags.
While I cannot reproduce the issue, I think this may be the proper fix and we can monitor. The more issues, the more I feel that we should be injecting these dependencies instead of resolving it through the protocol.

image

Bitrise:

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@cyndichin cyndichin requested a review from yoanarios May 15, 2026 18:52
@cyndichin cyndichin requested a review from a team as a code owner May 15, 2026 18:52
@mobiletest-ci-bot

mobiletest-ci-bot commented May 15, 2026

Copy link
Copy Markdown
Messages
📖 Project coverage: 42.74%

🧹 Tidy commit

Just 1 file(s) touched. Thanks for keeping it clean and review-friendly!

🙌 Friday high-five

Thanks for pushing us across the finish line this week! 🙌

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

✅ New file code coverage

No new file detected so code coverage gate wasn't ran.

✅ Existing file code coverage

No modified file had significant enough changes for the coverage gate to run.

Client.app: Coverage: 41.31

File Coverage
TopSitesProvider.swift 93.88%

Generated by 🚫 Danger Swift against 9addfdb

@yoanarios yoanarios left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@cyndichin

Copy link
Copy Markdown
Contributor Author

@Mergifyio rebase

@mergify

mergify Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

rebase

✅ Branch has been successfully rebased

@cyndichin cyndichin force-pushed the cc/FXIOS-15822_flaky-top-sites branch from 5eae242 to 9addfdb Compare May 29, 2026 14:38
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale. Please leave any comment to keep this PR opened. It will be closed automatically if no further update occurs in the next 7 days. Thank you for your contributions!

@github-actions github-actions Bot added the stale Stalebot use this label to stale issues and PRs label Jun 13, 2026
@github-actions github-actions Bot closed this Jun 21, 2026

@piyyy314 piyyy314 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stalebot use this label to stale issues and PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants