-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Description
The test file tests/storage/test-MetadataStorage.cpp
contains duplicated task graph setup code across multiple test cases, specifically in the "Job cancel" and "Job cancel by task" tests around lines 465-489 and 531-555.
Both test cases contain nearly identical code (approximately 25 lines each) for creating the same task graph structure with child_task, parent_1, and parent_2 tasks. This duplication violates the DRY principle and makes maintenance more difficult.
Proposed Solution
Extract the common setup code into a helper function that initializes and returns the task graph and associated tasks. This will improve code maintainability and test readability.
References
- Pull Request: feat: Add job cancellation for early stop of the job execution. #137
- Comment: feat: Add job cancellation for early stop of the job execution. #137 (comment)
- Requested by: @davidlion
Metadata
Metadata
Assignees
Labels
No labels