summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBartosz Sosnowski <bartosz@janeasystems.com>2018-09-12 11:07:00 +0200
committerDaniel Bevenius <daniel.bevenius@gmail.com>2018-09-19 08:02:18 +0200
commit6e746f1a55e5d94f1a8330d3436a64ed8d6f639b (patch)
tree366c3bce91dc99c6411e820a10b7de2e857f0ebb /test
parenta1381fab8a1a35b3af9cf1cfb2f40b3a6f28eb5c (diff)
downloadandroid-node-v8-6e746f1a55e5d94f1a8330d3436a64ed8d6f639b.tar.gz
android-node-v8-6e746f1a55e5d94f1a8330d3436a64ed8d6f639b.tar.bz2
android-node-v8-6e746f1a55e5d94f1a8330d3436a64ed8d6f639b.zip
doc, win: improve os.setPriority documentation
PR-URL: https://github.com/nodejs/node/pull/22817 Fixes: https://github.com/nodejs/node/issues/22799 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-os-process-priority.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-os-process-priority.js b/test/parallel/test-os-process-priority.js
index 9d66cfc49b..05686e6c77 100644
--- a/test/parallel/test-os-process-priority.js
+++ b/test/parallel/test-os-process-priority.js
@@ -116,8 +116,10 @@ function checkPriority(pid, expected) {
return;
}
+ // On Windows setting PRIORITY_HIGHEST will only work for elevated user,
+ // for others it will be silently reduced to PRIORITY_HIGH
if (expected < PRIORITY_HIGH)
- assert.strictEqual(priority, PRIORITY_HIGHEST);
+ assert.ok(priority === PRIORITY_HIGHEST || priority === PRIORITY_HIGH);
else if (expected < PRIORITY_ABOVE_NORMAL)
assert.strictEqual(priority, PRIORITY_HIGH);
else if (expected < PRIORITY_NORMAL)