mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 13:09:21 +01:00
test: fix determining lower priority
PR-URL: https://github.com/nodejs/node/pull/55908 Fixes: https://github.com/NixOS/nixpkgs/issues/355919 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
81f7c769e1
commit
f270462c09
@ -84,7 +84,8 @@ assert.ok(hostname.length > 0);
|
|||||||
// IBMi process priority is different.
|
// IBMi process priority is different.
|
||||||
if (!common.isIBMi) {
|
if (!common.isIBMi) {
|
||||||
const { PRIORITY_BELOW_NORMAL, PRIORITY_LOW } = os.constants.priority;
|
const { PRIORITY_BELOW_NORMAL, PRIORITY_LOW } = os.constants.priority;
|
||||||
const LOWER_PRIORITY = os.getPriority() > PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW;
|
// Priority means niceness: higher numeric value <=> lower priority
|
||||||
|
const LOWER_PRIORITY = os.getPriority() < PRIORITY_BELOW_NORMAL ? PRIORITY_BELOW_NORMAL : PRIORITY_LOW;
|
||||||
os.setPriority(LOWER_PRIORITY);
|
os.setPriority(LOWER_PRIORITY);
|
||||||
const priority = os.getPriority();
|
const priority = os.getPriority();
|
||||||
is.number(priority);
|
is.number(priority);
|
||||||
|
Loading…
Reference in New Issue
Block a user