Skip to content

Commit

Permalink
test: tune test-uv-threadpool-schedule
Browse files Browse the repository at this point in the history
test-uv-threadpool-schedule has been failing consistently in
node-daily-master CI. It also fails consistently on my personal laptop.
These changes make it pass consistently with current master but fail
consistently with Node.js 10.11 (which was the last release in the 10.x
line before the fix that the test is for). It succeeds/fails as expected
whether or not I am connected to the network.

Fixes: nodejs#25305
  • Loading branch information
Trott committed Jan 6, 2019
1 parent 728505a commit a963ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/internet/test-uv-threadpool-schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const assert = require('assert');

const start = Date.now();

const slowIOmax = 100;
const slowIOmax = 10;
let slowIOcount = 0;
let fastIOdone = false;
let slowIOend, fastIOend;
Expand All @@ -37,7 +37,7 @@ function onResolve() {
// highly load / platform dependent, so don't be very greedy.
const fastIOtime = fastIOend - start;
const slowIOtime = slowIOend - start;
const expectedMax = slowIOtime / 100;
const expectedMax = slowIOtime / 10;
assert.ok(fastIOtime < expectedMax,
'fast I/O took longer to complete, ' +
`actual: ${fastIOtime}, expected: ${expectedMax}`);
Expand Down

0 comments on commit a963ae1

Please sign in to comment.