Skip to content

fix(tests): improve test reliability — FileLoader errors, state cleanup, debug logs#5013

Open
PascalThuet wants to merge 1 commit into
Dash-Industry-Forum:developmentfrom
PascalThuet:fix/test-quality-p1-p2-p3
Open

fix(tests): improve test reliability — FileLoader errors, state cleanup, debug logs#5013
PascalThuet wants to merge 1 commit into
Dash-Industry-Forum:developmentfrom
PascalThuet:fix/test-quality-p1-p2-p3

Conversation

@PascalThuet
Copy link
Copy Markdown
Contributor

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 returned undefined, 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 manuallySetPlaybackQuality block modify dummyRepresentations[0].segmentSequenceProperties without restoring it. Added a reset in afterEach to prevent order-dependent test failures.

P3 — Remove debug console.log:
Removed leftover console.log calls from:

  • VideoModelMock.js (line 172)
  • streaming.controllers.ExtUrlQueryInfoController.js (lines 137, 272)
  • streaming.controllers.ServiceDescriptionController.js (line 89)

Not included: The StreamController EventBus listener cleanup (P2) was investigated but causes a regression on Firefox due to test ordering dependencies in the error management block. This needs a deeper fix and is left for a separate PR.

Test plan

  • All unit tests pass in CI
  • No regressions from FileLoader change (tests that load fixtures still work)
  • AbrController tests pass regardless of execution order

Refs #5011

🤖 Generated with Claude Code

…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>
@dsilhavy dsilhavy added this to the 5.2.1 milestone Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants