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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix TestDisplayLink rounding issues #3482

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Dec 5, 2023

📜 Description

Calling the TestDisplayLinkWrapper with multiple slowestSlowFrames or fastestFrozenFrames in tests leads to wrong results. This is fixed now by adding and subtracting the timeEpsilon for these.

#skip-changelog

💡 Motivation and Context

This came up when implementing frame delay #3481.

💚 How did you test it?

Unit tests.

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Calling the TestDisplayLinkWrapper with multiple slowestSlowFrames or
fastestFrozenFrames in tests leads to wrong results. This is fixed now
by adding and subtracting the timeEpsilon for these.
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Merging #3482 (61671c9) into main (50bbebb) will increase coverage by 0.007%.
The diff coverage is 100.000%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3482       +/-   ##
=============================================
+ Coverage   89.033%   89.041%   +0.007%     
=============================================
  Files          525       525               
  Lines        56710     56887      +177     
  Branches     20145     20443      +298     
=============================================
+ Hits         50491     50653      +162     
- Misses        5300      5313       +13     
- Partials       919       921        +2     
Files Coverage Δ
SentryTestUtils/TestDisplayLinkWrapper.swift 95.061% <100.000%> (+0.256%) ⬆️
...ance/FramesTracking/SentryFramesTrackerTests.swift 97.727% <100.000%> (+0.358%) ⬆️

... and 72 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 50bbebb...61671c9. Read the comment docs.

@philipphofmann philipphofmann merged commit ddb4778 into main Dec 7, 2023
51 of 53 checks passed
@philipphofmann philipphofmann deleted the test/display-link-rounding-issues branch December 7, 2023 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants