Open data-sync-user opened 1 month ago
➤ ih-codes commented:
This ticket and the related PR are currently on hold until we have a discussion at mozweek regarding how we want to go forward with testing code using the new swift concurrency library.
➤ ih-codes commented:
Update 2: A new PR has been made which only addresses this ticket and no other refactors related to the TabManagerTests.
https://github.com/mozilla-mobile/firefox-ios/pull/21439 ( https://github.com/mozilla-mobile/firefox-ios/pull/21439|smart-link )
Cyndi Chin While it seems to help, it does not fix the original addTabsForURLs issues you spotted.
Do we want to make a separate test task for those? I’m pretty sure the true culprit in that case has something to do with the storeChanges call inside addTabs, not the selectTab method itself.
➤ ih-codes commented:
https://github.com/mozilla-mobile/firefox-ios/pull/21496 ( https://github.com/mozilla-mobile/firefox-ios/pull/21496|smart-link )
The above PR should actually eliminate some of the async issues with this test. My PR for this been closed.
Cyndi Chin I’m going to mark this ticket as open if you want to take another look. Fingers crossed that the test is ok now! 🤞
Background context:
When working on writing tests for
addTabsForURLs
, the test seems to fail whenshouldSelectTab
is set totrue
. By doing so, this hits theselectTab
method, which causes the test to fail on the memory leak check increateSubject
. As a workaround, I setshouldSelectTab
tofalse
, which still provides valuable tests as I was working on the private mode logic.Repro steps:
To isolate select tab from the
addTabsForURLs
method, you can attempt to run the following tests:!image-20240718-170553.png|width=732,height=69,alt="image-20240718-170553.png"!
Next Steps: To investigate the selectTab and why is the tab manager not being deallocated.
https://github.com/mozilla-mobile/firefox-ios/pull/20975
┆Issue is synchronized with this Jira Task