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 <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
LiviaMedeiros authored and aduh95 committed Dec 10, 2024
1 parent bdae1b2 commit 12ebb56
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 12ebb56

Please sign in to comment.