Skip to content

chore(test): migrate and refine tests for OTA downloader to follow new test layout#926

Draft
Bodong-Yang wants to merge 2 commits intomainfrom
worktree-chore+migrate_integration_downloader
Draft

chore(test): migrate and refine tests for OTA downloader to follow new test layout#926
Bodong-Yang wants to merge 2 commits intomainfrom
worktree-chore+migrate_integration_downloader

Conversation

@Bodong-Yang
Copy link
Copy Markdown
Member

No description provided.

Bodong-Yang and others added 2 commits April 27, 2026 11:41
…ation

Migrate tests/test_otaclient_common/test_downloader.py per Phase 2 of
MIGRATION_PLAN.md, splitting it across the unit and integration tiers
per the §3 scope rule.

test/unit/test_otaclient_common/test_downloader.py (47 cases) covers
the pure-logic and mocked-session paths: cache-policy parsing, header
injection helpers, ZstdDecompressionAdapter, retry_on_digest_mismatch
decorator, Downloader construction (proxy/cookies/force_http/
decompressor lookup), DownloaderPool instance/thread accounting, and
downloading_watchdog driven by a mocked clock.

test/integration/test_otaclient_common/test_downloader.py (15 cases)
exercises the live HTTP server paths: full-corpus and concurrent-pool
downloads, PartialDownload/HashVerificationError/404 passthrough,
retry-cache-control header injection observed end-to-end, and urllib3
HTTPResponse live access.

The corpus generator + ephemeral-port HTTP subprocess fixture move to
the subtree-local conftest.py (replaces the hard-coded port 8889 and
the fixed sleep(3) startup wait).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 27, 2026

📊 OTA Update Performance Comparison Report

Generated: 2026-04-27T02:59:45.100776

⏱️ Execution Time

Phase Legacy (s) V1 (s)
Total Duration 27.5 29.4
Metadata Processing 2.0 2.0
Delta Calculation 11.0 11.0
Download 2.0 4.0
Apply Update 7.0 7.0
Post Update 0.0 0.0
Finalization 0.0 0.0

@Bodong-Yang Bodong-Yang added chore Pull requests that do not relate to a fix or feature and don't modify source code(like tagging, etc) test_files Add/change test files labels Apr 27, 2026
@Bodong-Yang Bodong-Yang changed the title chore(test): migrate tests for OTA downloader to follow new test layout chore(test): migrate and refine tests for OTA downloader to follow new test layout Apr 27, 2026
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests that do not relate to a fix or feature and don't modify source code(like tagging, etc) test_files Add/change test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant