Skip to content

Commit 48335f6

Browse files
committed
test: pin the budget rule to one unit per launch attempt
1 parent 9667c31 commit 48335f6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/core/run.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,10 @@ test("a task that catches a failed relaunch is re-entered rather than left waiti
21062106
expect(caught).toContain("503 from the gateway")
21072107
expect(result.outcome).toBe("completed")
21082108
expect(entries).toEqual([1, 2])
2109+
// One unit per launch attempt, stated once and applied everywhere: the
2110+
// relaunch's attempt that failed, and the loop's that worked. 0.2.0 charged
2111+
// the failed one twice — once for the relaunch, once for the death it caused.
2112+
expect(events[0]?.relaunches).toBe(2)
21092113
expect(events[0]?.manualRelaunches).toBe(0)
21102114
})
21112115

0 commit comments

Comments
 (0)