Commit 208446d
[copilot-finds] Bug: TestOrchestrationWorker processing loop crashes when completeOrchestration fails
completeOrchestration throws when the instance has been purged or the
backend reset, but completeActivity silently returns for the same case.
When the test worker's processOrchestration catch block calls
completeOrchestration on a missing instance, the unhandled exception
propagates to runProcessingLoop and kills it. All subsequent work items
are silently dropped.
Fix both the root cause and the symptom:
- completeOrchestration now returns silently for missing instances,
consistent with completeActivity
- processOrchestration's catch block wraps completeOrchestration in a
nested try-catch for defense-in-depth
Add two new tests:
- Worker continues processing after backend reset during execution
- completeOrchestration silently ignores purged instances
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5cc8dd0 commit 208446d
3 files changed
Lines changed: 51 additions & 2 deletions
File tree
- packages/durabletask-js
- src/testing
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
476 | 520 | | |
477 | 521 | | |
478 | 522 | | |
| |||
0 commit comments