Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions tests/pools/abstract-pool.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1590,14 +1590,9 @@ describe({
await pool.destroy()
const elapsedTime = performance.now() - startTime
expect(tasksFinished).toBe(0)
// Worker kill message response timeout is 1000ms.
// Allow a small scheduler overhead margin on busy CI hosts.
const schedulerOverheadMargin = 100
// Worker kill message response timeout is 1000ms
expect(elapsedTime).toBeLessThanOrEqual(
tasksFinishedTimeout +
1000 * tasksFinished +
1000 +
schedulerOverheadMargin,
tasksFinishedTimeout + 1000 * tasksFinished + 1000,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid an exact timer ceiling

This test now fails whenever the two timeout-based waits in destroyWorkerNode() overshoot by even a few milliseconds: waitWorkerNodeEvents(..., tasksFinishedTimeout, false) and the subsequent kill-message timeout both use setTimeout, and the CI workflow runs deno task test:coverage across Windows, macOS, Ubuntu, and multiple Deno versions. On a busy runner, an elapsed time like 2001ms is expected scheduler delay rather than a destroy() regression, so removing the small margin reintroduces a flaky CI failure.

Useful? React with 👍 / 👎.

)
})

Expand Down
Loading