aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-01-05 16:21:00 -0800
committerRich Trott <rtrott@gmail.com>2019-01-07 19:08:05 -0800
commit9987f1abb92461af5b2da61befe7ce0c1ab19503 (patch)
tree9ed29799cd007687a2a3093e49a0321d7e9b5a29 /test
parent4a6ec3bd05e2e2d3f121e0d3dea281a6ef7fa32a (diff)
downloadandroid-node-v8-9987f1abb92461af5b2da61befe7ce0c1ab19503.tar.gz
android-node-v8-9987f1abb92461af5b2da61befe7ce0c1ab19503.tar.bz2
android-node-v8-9987f1abb92461af5b2da61befe7ce0c1ab19503.zip
test: tune test-uv-threadpool-schedule
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: https://github.com/nodejs/node/issues/25305 PR-URL: https://github.com/nodejs/node/pull/25358 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/internet/test-uv-threadpool-schedule.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/internet/test-uv-threadpool-schedule.js b/test/internet/test-uv-threadpool-schedule.js
index 636364b30f..9e61d875f2 100644
--- a/test/internet/test-uv-threadpool-schedule.js
+++ b/test/internet/test-uv-threadpool-schedule.js
@@ -31,13 +31,13 @@ function onResolve() {
'fast I/O was throttled due to threadpool congestion.');
// More realistic expectation: finish disc I/O at least within
- // a time duration that is 1/100th of net I/O.
+ // a time duration that is half of net I/O.
// Ideally the slow I/O should not affect the fast I/O as those
// have two different thread-pool buckets. However, this could be
// 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 / 2;
assert.ok(fastIOtime < expectedMax,
'fast I/O took longer to complete, ' +
`actual: ${fastIOtime}, expected: ${expectedMax}`);