Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor FXIOS-9270 Add debug logging for intermittent ContentBlockerTest failure #20597

Conversation

MattLichtenstein
Copy link
Collaborator

馃摐 Tickets

Jira ticket
Github issue

馃挕 Description

  • testCompileListsNotInStore_callsCompletionHandlerSuccessfully seems to be failing intermittently on Bitrise, but not locally. Here we are adding a timeout and measuring elapsed time to the flaky test to determine if it is timing issue.

馃摑 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

Matt Lichtenstein and others added 2 commits June 7, 2024 17:00
@MattLichtenstein MattLichtenstein requested a review from a team as a code owner June 7, 2024 21:56
@mobiletest-ci-bot
Copy link

mobiletest-ci-bot commented Jun 7, 2024

Messages
馃摉 Edited 1 files
馃摉 Created 0 files

Generated by 馃毇 Danger Swift against c39b2b5

@nbhasin2 nbhasin2 requested review from nbhasin2 and removed request for PARAIPAN9 June 7, 2024 22:21
Copy link
Contributor

Choose a reason for hiding this comment

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

A test failed but not the one we wanted

ContentBlocker.shared.compileListsNotInStore {
let finishDate = Date()
print(finishDate.timeIntervalSince(startDate))
Copy link
Contributor

Choose a reason for hiding this comment

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

can you put some pointers like "MT Test Time - (finishDate.timeIntervalSince(startDate))" to make it easier to find it, also this won't be pushed to production so we can play around with adding nslog as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will add better debug logging 馃槄

Also, since the test failure is intermittent, would it be worth merging to production, that way we can passively gather these metrics with all other PR's instead of just re-running this one until it occurs again?

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't merge print statements to prod but if you are interested in learning more about performance testing then you can run something similar in that manner

Tagging @isabelrios for pointers here on how to measure performance of a method

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry fo the late reply here. Yeah, we try not to use print statments in our tests.

In the Performance tests we use measure and the metrics its provides. Not sure if that would serve your needs... but just in case

@nbhasin2 nbhasin2 added the Do Not Merge 鉀旓笍 This issue is a work in progress and is not ready to land label Jun 7, 2024
@MattLichtenstein MattLichtenstein changed the title Ml/FXIOS-9270 test compile lists not in store calls completion handler successfully intermittent failure Refactor FXIOS-9270 Add debug logging for intermittent ContentBlockerTest failure Jun 10, 2024
ContentBlocker.shared.compileListsNotInStore {
let finishDate = Date()
NSLog("MT Test Time - \(finishDate.timeIntervalSince(startDate))")
Copy link
Contributor

Choose a reason for hiding this comment

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

Going to tag @isabelrios and @clarmso in case you do something specific for performance integration testing

Copy link
Contributor

@nbhasin2 nbhasin2 left a comment

Choose a reason for hiding this comment

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

@MattLichtenstein do we need a change to remove the logging?

As I understand this is temporary we can add a ticket to remove it once we have the data needed for this

@MattLichtenstein
Copy link
Collaborator Author

MattLichtenstein commented Jun 18, 2024

@MattLichtenstein do we need a change to remove the logging?

As I understand this is temporary we can add a ticket to remove it once we have the data needed for this

@nbhasin2 Yep, created FXIOS-9351: Remove debug logging from ContentBlockerTests:testCompileListsNotInStore_callsCompletionHandlerSuccessfully.

Shall we remove the "Do no merge" label?

@nbhasin2
Copy link
Contributor

@MattLichtenstein do we need a change to remove the logging?

As I understand this is temporary we can add a ticket to remove it once we have the data needed for this

@nbhasin2 Yep, created FXIOS-9351: Remove debug logging from ContentBlockerTests:testCompileListsNotInStore_callsCompletionHandlerSuccessfully.

Shall we remove the "Do no merge" label?

You can remove it, although I would ask @isabelrios for a quick review before merging

@MattLichtenstein MattLichtenstein removed the Do Not Merge 鉀旓笍 This issue is a work in progress and is not ready to land label Jun 18, 2024
Copy link
Contributor

@nbhasin2 nbhasin2 left a comment

Choose a reason for hiding this comment

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

Double approval

@MattLichtenstein MattLichtenstein merged commit 01a4532 into main Jun 21, 2024
10 checks passed
@MattLichtenstein MattLichtenstein deleted the ml/FXIOS-9270_testCompileListsNotInStore_callsCompletionHandlerSuccessfully-intermittent-failure branch June 21, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants