test: increase coverage for error paths and conversions
Add targeted coverage tests to maintain >80% code coverage minimum: - ExtractInput error paths (14 tests): Type mismatch errors for Result, Option, Vec, HashMap, Arc, and primitive types. Directly exercises error formatting code that was previously uncovered. - DagRunner::get() type mismatch (6 tests): Covers the type mismatch error path when attempting to retrieve task output with wrong type. Tests various type combinations to ensure robust error handling. - TaskBuilder conversions (9 tests): Covers the From<TaskBuilder> to TaskHandle conversion for unit-type tasks, ensuring ID preservation and correct handling of mixed task types. Also fixes timing test threshold from 10ms to 50ms to account for tarpaulin instrumentation overhead while still validating parallel execution. Coverage increased from ~78% to 82.04% (above 80% minimum requirement).
This commit is contained in:
7 files changed
+922
-1
No files matched your search
@@ -309,8 +309,10 @@ async fn test_parallel_branches_with_dependencies() -> DagResult<()> {
|
||||
b2_1_start - b1_1_start
|
||||
};
|
||||
|
||||
// Use a more generous threshold to account for coverage instrumentation overhead
|
||||
// 50ms is enough to prove they're parallel (not sequential) while being robust to overhead
|
||||
assert!(
|
||||
branch_start_diff < Duration::from_millis(10),
|
||||
branch_start_diff < Duration::from_millis(50),
|
||||
"Branches should start in parallel, diff was {:?}",
|
||||
branch_start_diff
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user