Skip to content

830 reduce flakiness of some tests#846

Merged
StaehliJ merged 9 commits intomainfrom
830-reduce-flakiness-of-some-tests
Jan 6, 2025
Merged

830 reduce flakiness of some tests#846
StaehliJ merged 9 commits intomainfrom
830-reduce-flakiness-of-some-tests

Conversation

@MGaetan89
Copy link
Contributor

Pull request

Description

This PR attempts to mitigate flakiness of some tests.

  • For the TimeoutException mentioned in Reduce flakiness of some tests #830, I expect that they will be fixed with Investigate local file for tests #831.
  • For the MockKException, the issue probably comes from an other test than CommandersActTrackerIntegrationTest, because CommandersActTrackerIntegrationTest doesn't use a mocked player.
  • For the AssertionError, I'll continue the investigation and try to submit a fix in a dedicated PR.

Changes made

  • Add some missing clearAllMocks() calls.
  • Create a SRG PillarboxExoPlayer configured for tests.
  • Continue migration from jUnit to Kotlin Test where possible.
  • Make TestPillarboxRunHelper.runUntilEvents() support multiple events.
  • Avoid sending networks requests:
    • Monitoring has been disabled in tests.
    • RequestSenderTest now uses a mocked OkHttpClient instead of using HttpBin.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@github-actions
Copy link

github-actions bot commented Jan 3, 2025

Code Coverage

Overall Project 52.02% 🟢

There is no coverage information present for the Files changed

@MGaetan89 MGaetan89 linked an issue Jan 5, 2025 that may be closed by this pull request
Base automatically changed from fix_media_url to main January 6, 2025 08:22
Copy link
Contributor

@StaehliJ StaehliJ left a comment

Choose a reason for hiding this comment

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

Sounds good, will see if we have less flaky tests

@StaehliJ StaehliJ added this pull request to the merge queue Jan 6, 2025
Merged via the queue into main with commit 4615146 Jan 6, 2025
@StaehliJ StaehliJ deleted the 830-reduce-flakiness-of-some-tests branch January 6, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Reduce flakiness of some tests

2 participants