| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 96e8e86 commit 60704fb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,13 +9,13 @@ | |||
| 9 | 9 | * | |
| 10 | 10 | * The reason was that the value that represents the current time was not | |
| 11 | 11 | * updated between the time the original callback was called and the time | |
| 12 | - * the added timer was processed by timers.listOnTimeout. That lead the | ||
| 12 | + * the added timer was processed by timers.listOnTimeout. That led the | ||
| 13 | 13 | * logic in timers.listOnTimeout to do an incorrect computation that made | |
| 14 | 14 | * the added timer fire with a timeout of scheduledTimeout + | |
| 15 | 15 | * timeSpentInCallback. | |
| 16 | 16 | * | |
| 17 | 17 | * This test makes sure that a timer added by another timer's callback | |
| 18 | - * fire with the expected timeout. | ||
| 18 | + * fires with the expected timeout. | ||
| 19 | 19 | * | |
| 20 | 20 | * It makes sure that it works when the timers list for a given timeout is | |
| 21 | 21 | * empty (see testAddingTimerToEmptyTimersList) and when the timers list | |
@@ -44,12 +44,11 @@ function blockingCallback(callback) { | |||
| 44 | 44 | if (nbBlockingCallbackCalls > 1) { | |
| 45 | 45 | latestDelay = Timer.now() - timeCallbackScheduled; | |
| 46 | 46 | // Even if timers can fire later than when they've been scheduled | |
| 47 | - // to fire, they should more than 50% later with a timeout of | ||
| 48 | - // 100ms. Firing later than that would mean that we hit the regression | ||
| 49 | - // highlighted in | ||
| 47 | + // to fire, they shouldn't generally be more than 100% late in this case. | ||
| 48 | + // But they are guaranteed to be at least 100ms late given the bug in | ||
| 50 | 49 | // https://github.com/nodejs/node-v0.x-archive/issues/15447 and | |
| 51 | 50 | // https://github.com/nodejs/node-v0.x-archive/issues/9333.. | |
| 52 | - assert(latestDelay < TIMEOUT * 1.5); | ||
| 51 | + assert(latestDelay < TIMEOUT * 2); | ||
| 53 | 52 | if (callback) | |
| 54 | 53 | return callback(); | |
| 55 | 54 | } else { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments