Skip to content

Conversation

@stefanosiano
Copy link
Member

📜 Description

#skip-changelog

💡 Motivation and Context

RateLimiterTest close cancels the timer was flaky
Now it uses reflection to assert the timer was cancelled

💚 How did you test it?

📝 Checklist

  • 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.
  • I updated the wizard 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

@stefanosiano stefanosiano marked this pull request as ready for review January 23, 2025 15:57
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 456.19 ms 473.73 ms 17.54 ms
Size 1.65 MiB 2.31 MiB 677.61 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
00c8eeb 415.32 ms 428.08 ms 12.76 ms

App size

Revision Plain With Sentry Diff
00c8eeb 1.70 MiB 2.36 MiB 671.98 KiB

@stefanosiano stefanosiano merged commit 2872e8e into main Jan 23, 2025
37 of 38 checks passed
@stefanosiano stefanosiano deleted the fix/flaky-ratelimiter-test branch January 23, 2025 16:14
markushi pushed a commit that referenced this pull request Mar 4, 2025
* changed RateLimiterTest `close cancels the timer` to use reflection
markushi added a commit that referenced this pull request Mar 10, 2025
…ion is not running (#4216)

* Ensure app start type is set, even when ActivityLifecycleIntegration is not activated

* Update Changelog

* Add proper tests

* Add code comments

* Unify handling

* Move all app start handling to AppStartMetrics

* Make tests happy

* Fix flaky RateLimiter test (#4100)

* changed RateLimiterTest `close cancels the timer` to use reflection

* Update sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java

Co-authored-by: Stefano <[email protected]>

* Address PR feedback

* Fix post-merge conflict

* Format code

* Address PR feedback

* Address PR feedback

* Update sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java

---------

Co-authored-by: Stefano <[email protected]>
Co-authored-by: Sentry Github Bot <[email protected]>
markushi added a commit that referenced this pull request Mar 12, 2025
…ion is not running (#4216)

* Ensure app start type is set, even when ActivityLifecycleIntegration is not activated

* Update Changelog

* Add proper tests

* Add code comments

* Unify handling

* Move all app start handling to AppStartMetrics

* Make tests happy

* Fix flaky RateLimiter test (#4100)

* changed RateLimiterTest `close cancels the timer` to use reflection

* Update sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java

Co-authored-by: Stefano <[email protected]>

* Address PR feedback

* Fix post-merge conflict

* Format code

* Address PR feedback

* Address PR feedback

* Update sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java

---------

Co-authored-by: Stefano <[email protected]>
Co-authored-by: Sentry Github Bot <[email protected]>
markushi added a commit that referenced this pull request Mar 17, 2025
…ion is not running (#4250)

* Fix Ensure app start type is set, even when ActivityLifecycleIntegration is not running (#4216)

* Ensure app start type is set, even when ActivityLifecycleIntegration is not activated

* Update Changelog

* Add proper tests

* Add code comments

* Unify handling

* Move all app start handling to AppStartMetrics

* Make tests happy

* Fix flaky RateLimiter test (#4100)

* changed RateLimiterTest `close cancels the timer` to use reflection

* Update sentry-android-core/src/main/java/io/sentry/android/core/ActivityLifecycleIntegration.java

Co-authored-by: Stefano <[email protected]>

* Address PR feedback

* Fix post-merge conflict

* Format code

* Address PR feedback

* Address PR feedback

* Update sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java

---------

Co-authored-by: Stefano <[email protected]>
Co-authored-by: Sentry Github Bot <[email protected]>

* Fix properly reset application/content-provider timespans

* Update Changelog

* Fix tests

---------

Co-authored-by: Stefano <[email protected]>
Co-authored-by: Sentry Github Bot <[email protected]>
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.

4 participants