-
Notifications
You must be signed in to change notification settings - Fork 1.7k
add unit test for ContentSteeringController, CatchupController, GapController #4885
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
base: development
Are you sure you want to change the base?
add unit test for ContentSteeringController, CatchupController, GapController #4885
Conversation
|
@dsilhavy |
|
@dsilhavy |
@codomposer No not yet, I have assigned it to the v5.1.1 which is targeted for end of December. We will check it within this development cycle once 5.1.0 is out. |
dsilhavy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request @codomposer . I added some comments.
In general, it looks to me like the majority of these new testcases are AI generated. While it is perfectly reasonable to use AI for this (I do it too ofc) I think some testcases need clarification and refinement. Especially when it comes to checking if the triggered events are actually leading to the desired behavior. This might only be possible to a certain degree as most of the events trigger a private function of the corresponding class. However, most testcases are not even using expect so I assume the goal was to check if any error is thrown?
|
@codomposer Why did you close the PR? |
Sorry, closed by mistake |
Np, thanks for reopening. I will look at the PR this week |
Add Unit Tests for Missing Controllers
Summary
This PR adds comprehensive unit tests for three controllers that were previously missing test coverage:
GapController(streaming/controllers)CatchupController(streaming/controllers)ContentSteeringController(dash/controllers)Changes Made
New Test Files
test/unit/test/streaming/streaming.controllers.GapController.jstest/unit/test/streaming/streaming.controllers.CatchupController.jstest/unit/test/dash/dash.controllers.ContentSteeringController.jsMock Updates
Enhanced existing mocks to support the new tests:
test/unit/mocks/MediaPlayerModelMock.jsgetCatchupModeEnabled()methodgetCatchupMaxDrift()methodtest/unit/mocks/PlaybackControllerMock.jsseekToCurrentLive()methodgetBufferLevel()methodgetPlaybackStalled()methodgetStreamEndTime()methodtest/unit/mocks/StreamControllerMock.jsgetIsStreamSwitchInProgress()methodgetHasMediaOrInitialisationError()methodgetStreamForTime()methodTest Coverage
All tests follow the existing project patterns:
Closes #4880
Contribution by Gittensor, learn more at https://gittensor.io/