| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,5 +22,3 @@ test-vm-timeout-escape-promise: PASS,FLAKY | |||
| 22 | 22 | [$system==aix] | |
| 23 | 23 | ||
| 24 | 24 | [$arch==arm] | |
| 25 | - # https://github.com/nodejs/node/issues/24120 | ||
| 26 | - test-vm-timeout-escape-nexttick: PASS,FLAKY | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,16 +27,20 @@ function loop() { | |||
| 27 | 27 | } | |
| 28 | 28 | } | |
| 29 | 29 | ||
| 30 | - assert.throws(() => { | ||
| 31 | - vm.runInNewContext( | ||
| 32 | - 'nextTick(loop); loop();', | ||
| 33 | - { | ||
| 34 | - hrtime, | ||
| 35 | - nextTick, | ||
| 36 | - loop | ||
| 37 | - }, | ||
| 38 | - { timeout: common.platformTimeout(10) } | ||
| 39 | - ); | ||
| 40 | - }, { | ||
| 41 | - code: 'ERR_SCRIPT_EXECUTION_TIMEOUT' | ||
| 42 | - }); | ||
| 30 | + // The bug won't happen 100% reliably so run the test a small number of times to | ||
| 31 | + // make sure we catch it if the bug exists. | ||
| 32 | + for (let i = 0; i < 4; i++) { | ||
| 33 | + assert.throws(() => { | ||
| 34 | + vm.runInNewContext( | ||
| 35 | + 'nextTick(loop); loop();', | ||
| 36 | + { | ||
| 37 | + hrtime, | ||
| 38 | + nextTick, | ||
| 39 | + loop | ||
| 40 | + }, | ||
| 41 | + { timeout: common.platformTimeout(10) } | ||
| 42 | + ); | ||
| 43 | + }, { | ||
| 44 | + code: 'ERR_SCRIPT_EXECUTION_TIMEOUT' | ||
| 45 | + }); | ||
| 46 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments