fix(tests): improve test reliability — FileLoader errors, state cleanup, debug logs#5013
Open
PascalThuet wants to merge 1 commit into
Open
Conversation
…up, debug logs P1: FileLoader now throws on HTTP errors instead of logging and returning undefined. This makes fixture-loading failures immediately visible as test failures. P2: AbrController afterEach now rebuilds streamProcessor and resets modified representation properties to prevent order-dependent tests. StreamController test removes its EventBus listener after assertion. P3: Remove leftover console.log calls from VideoModelMock, ExtUrlQueryInfoController tests, and ServiceDescriptionController tests. Refs Dash-Industry-Forum#5011 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #5012, addressing the remaining P1/P2/P3 items from #5011.
P1 — FileLoader now throws on HTTP errors:
FileLoader._loadFile()previously logged errors to console and returnedundefined, letting tests silently operate on bad input. It now throws with a clear message (FileLoader: <url> returned <status>), making fixture-loading failures immediately visible as test failures.P2 — AbrController state cleanup:
Tests in the
manuallySetPlaybackQualityblock modifydummyRepresentations[0].segmentSequencePropertieswithout restoring it. Added a reset inafterEachto prevent order-dependent test failures.P3 — Remove debug console.log:
Removed leftover
console.logcalls from:VideoModelMock.js(line 172)streaming.controllers.ExtUrlQueryInfoController.js(lines 137, 272)streaming.controllers.ServiceDescriptionController.js(line 89)Not included: The
StreamControllerEventBus listener cleanup (P2) was investigated but causes a regression on Firefox due to test ordering dependencies in theerror managementblock. This needs a deeper fix and is left for a separate PR.Test plan
Refs #5011
🤖 Generated with Claude Code