Commit f3250ca
committed
fix(worker): bound flakyActivity's effective retry policy in the fixture
The activityOptionsByName override in activity-options.workflows.ts
shallow-replaces flakyActivity's contract-level retry block (by design,
to prove shallow merge doesn't inherit maximumAttempts from the layer
below) but supplied no maximumAttempts of its own, leaving the EFFECTIVE
policy Temporal actually runs with unbounded. A regression that broke
the "succeeds on retry" path would hang the test to its 120s timeout
instead of failing an assertion.
Add an explicit maximumAttempts: 2 to the override — exactly what the
"fails once, succeeds on retry" implementation needs — without
defeating the shallow-merge proof: the override's own bound (2) still
visibly wins over the contract-level one (1), it's just no longer
implicitly unbounded in between.
Also soften activity-options.contract.ts's doc comment, which asserted
from an informal, unreproduced probe that the time-skipping server skips
retry backoff delay. That claim doesn't matter to correctness anymore:
the explicit cap bounds retries regardless of backoff timing.1 parent 2b01acc commit f3250ca
2 files changed
Lines changed: 30 additions & 16 deletions
Lines changed: 19 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
107 | 114 | | |
108 | 115 | | |
109 | 116 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
0 commit comments