fix: commit semantic repair changes
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
# [DEF:test_task_manager:Module]
|
||||
# @RELATION: BELONGS_TO -> SrcRoot
|
||||
# @COMPLEXITY: 5
|
||||
# @SEMANTICS: task-manager, lifecycle, CRUD, log-buffer, filtering, tests
|
||||
# @PURPOSE: Unit tests for TaskManager lifecycle, CRUD, log buffering, and filtering.
|
||||
# @LAYER: Core
|
||||
# @RELATION: TESTS -> backend.src.core.task_manager.manager.TaskManager
|
||||
# @INVARIANT: TaskManager state changes are deterministic and testable with mocked dependencies.
|
||||
|
||||
import sys
|
||||
@@ -17,6 +17,8 @@ from datetime import datetime
|
||||
|
||||
|
||||
# Helper to create a TaskManager with mocked dependencies
|
||||
# [DEF:_make_manager:Function]
|
||||
# @RELATION: BINDS_TO -> test_task_manager
|
||||
def _make_manager():
|
||||
"""Create TaskManager with mocked plugin_loader and persistence services."""
|
||||
mock_plugin_loader = MagicMock()
|
||||
@@ -50,12 +52,18 @@ def _make_manager():
|
||||
return manager, mock_plugin_loader, MockPersistence.return_value, MockLogPersistence.return_value
|
||||
|
||||
|
||||
# [/DEF:_make_manager:Function]
|
||||
|
||||
# [DEF:_cleanup_manager:Function]
|
||||
# @RELATION: BINDS_TO -> test_task_manager
|
||||
def _cleanup_manager(manager):
|
||||
"""Stop the flusher thread."""
|
||||
manager._flusher_stop_event.set()
|
||||
manager._flusher_thread.join(timeout=2)
|
||||
|
||||
|
||||
# [/DEF:_cleanup_manager:Function]
|
||||
|
||||
class TestTaskManagerInit:
|
||||
"""Tests for TaskManager initialization."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user