Commit afae3ed
fix: resolve flaky EngineCancellationTokenTests by handling scheduler cancellation
When a module fails and the pipeline is cancelled, the scheduler throws
OperationCanceledException from WaitForNextSchedulingOpportunity. This
exception was not being caught, causing RegisterTerminatedResultsForCancelledModules
to be skipped. Dependent modules never got their results registered,
causing the test to intermittently fail.
The fix catches OperationCanceledException from the scheduler task when
it's caused by a module failure (firstException != null), allowing the
result registration to proceed correctly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 4699707 commit afae3ed
2 files changed
Lines changed: 12 additions & 4 deletions
File tree
- src/ModularPipelines/Engine
- test/ModularPipelines.UnitTests/Execution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
133 | 143 | | |
134 | 144 | | |
135 | 145 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
0 commit comments