Commit 2e3387e
committed
fix(TaskRequest): retain completed tasks to prevent false stop_task failures
Introduce a `completed_tasks` map alongside `loader_tasks` so that tasks
are never silently dropped after completion. Previously, calling
`get_task_result()` removed the task from `loader_tasks`, causing a
subsequent `stop_task()` call to return `{"status": false, "error": "Task X
does not exists"}` — logged as CRITICAL in TAF even when the load succeeded.
Changes:
- `get_task_result()`: moves task from loader_tasks → completed_tasks
instead of discarding; also checks completed_tasks via getOrDefault so it
works when stop_task was called first
- `stop_task()`: moves task from loader_tasks → completed_tasks after
stop_load(); falls back to completed_tasks lookup to return true when task
was already consumed by get_task_result()
- `reset_task_manager()`: clears completed_tasks alongside loader_tasks to
prevent stale task-name collisions across test runs1 parent 5ca14fe commit 2e3387e
3 files changed
Lines changed: 62 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
97 | 149 | | |
98 | 150 | | |
99 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| 499 | + | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| |||
563 | 565 | | |
564 | 566 | | |
565 | 567 | | |
566 | | - | |
| 568 | + | |
| 569 | + | |
567 | 570 | | |
568 | 571 | | |
569 | 572 | | |
| |||
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
| 579 | + | |
576 | 580 | | |
577 | 581 | | |
578 | 582 | | |
| |||
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
605 | 613 | | |
606 | 614 | | |
607 | 615 | | |
| |||
0 commit comments