Skip to content

[FIX] Increasing Tests Coverage Back to The Threshold#101

Merged
antonio-amjr merged 2 commits into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/increase_test_coverage
Jul 8, 2026
Merged

[FIX] Increasing Tests Coverage Back to The Threshold#101
antonio-amjr merged 2 commits into
project-chip:v2.16-cli-developfrom
antonio-amjr:fix/increase_test_coverage

Conversation

@antonio-amjr

Copy link
Copy Markdown
Contributor

Description

  • Updated unit tests for log_stream_handler.py and logs_http_server.py to reflect the broadcast-pattern refactor (per-client queues replacing the shared log_queue)
  • Added missing test coverage for init_tree(), update_tree_node(), _build_tree(), _get_state(), serve_status(), tree snapshot path, keepalive, tree event routing, and all exception handlers
  • Restored overall test coverage from 83% back above the required 85% threshold

@antonio-amjr antonio-amjr requested review from oxesoft and rquidute July 8, 2026 13:13
@antonio-amjr antonio-amjr self-assigned this Jul 8, 2026
@antonio-amjr antonio-amjr added the bug Something isn't working label Jul 8, 2026
@mergify

mergify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive suite of unit tests for LogStreamHandler and LogsHTTPServer, covering error handling, tree state initialization, node updates, and various log streaming edge cases. The reviewer feedback focuses on enhancing the robustness of these tests by replacing loose assertions (such as assert_called) with precise ones (like assert_called_once_with) and ensuring that synchronization locks are explicitly verified as acquired.

Comment thread tests/test_run/test_log_stream_handler.py Outdated
Comment thread tests/test_run/test_log_stream_handler.py Outdated
Comment thread tests/test_run/test_logs_http_server.py Outdated
Comment thread tests/test_run/test_logs_http_server.py
Comment thread tests/test_run/test_logs_http_server.py
Comment thread tests/test_run/test_logs_http_server.py Outdated
Comment thread tests/test_run/test_logs_http_server.py Outdated
Comment thread tests/test_run/test_logs_http_server.py Outdated
@antonio-amjr antonio-amjr merged commit 16d3ddf into project-chip:v2.16-cli-develop Jul 8, 2026
4 checks passed
@antonio-amjr antonio-amjr deleted the fix/increase_test_coverage branch July 8, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants