Skip to content

Commit

Permalink
test: fix determining lower priority
Browse files Browse the repository at this point in the history
PR-URL: #55908
Fixes: NixOS/nixpkgs#355919
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
LiviaMedeiros authored and aduh95 committed Nov 26, 2024
1 parent 497a9ae commit 493e16c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-os.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ assert.ok(hostname.length > 0);
// IBMi process priority is different.
if (!common.isIBMi) {
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);
const priority = os.getPriority();
is.number(priority);
Expand Down

0 comments on commit 493e16c

Please sign in to comment.