Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: make the vm timeout escape tests more lenient
Previously the tests required that Node.js finish the initialization
of the watchdog thread and fires the timeout within 100ms, which
can be difficult on certain systems under load. This patch
relaxes the requirement to 2000ms. If there is a bug and the
timeout can actually be escaped, raising the timeout to 2000ms
would not make a difference anyway.

PR-URL: #44433
Refs: nodejs/reliability#333
Refs: nodejs/reliability#361
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
  • Loading branch information
joyeecheung committed Sep 6, 2022
commit 5dd57efe52c349bd7fd4845df1bb346533475552
2 changes: 1 addition & 1 deletion test/parallel/test-vm-timeout-escape-promise-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function loop() {
while (1) {
const current = hrtime();
const span = (current - start) / NS_PER_MS;
if (span >= 100n) {
if (span >= 2000n) {
throw new Error(
`escaped timeout at ${span} milliseconds!`);
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-timeout-escape-promise-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function loop() {
while (1) {
const current = hrtime();
const span = (current - start) / NS_PER_MS;
if (span >= 100n) {
if (span >= 2000n) {
throw new Error(
`escaped timeout at ${span} milliseconds!`);
}
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-timeout-escape-promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function loop() {
while (1) {
const current = hrtime();
const span = (current - start) / NS_PER_MS;
if (span >= 100n) {
if (span >= 2000n) {
throw new Error(
`escaped timeout at ${span} milliseconds!`);
}
Expand Down