Skip to content

test-os-process-priority failing on my Windows machine #22799

Description

@kfarnung
  • Version: master
  • Platform: Windows
  • Subsystem: os

When I run the test suite I get the following failure:

=== release test-os-process-priority ===
Path: parallel/test-os-process-priority
assert.js:84
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:

-14 !== -20

    at checkPriority (E:\GitHub\node\test\parallel\test-os-process-priority.js:120:12)
    at Object.<anonymous> (E:\GitHub\node\test\parallel\test-os-process-priority.js:97:3)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:270:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:801:3)
Command: E:\GitHub\node\Release\node.exe E:\GitHub\node\test\parallel\test-os-process-priority.js

I verified manually that setting the highest priority on my machine ends up setting high priority without any errors:

> const os = require('os')
undefined
> os.getPriority(0)
0
> os.setPriority(0, os.constants.priority.PRIORITY_HIGHEST)
undefined
> os.getPriority(0)
-14
> os.constants.priority.PRIORITY_HIGHEST
-20

It seems like although I'm asking for the highest priority Windows is pushing me down a level.

Activity

  1. kfarnung commented on Sep 10, 2018

    @kfarnung
    ContributorAuthor

    Looks like this API was added by @cjihrig in #22407, is anyone else having issues with this test on Windows?

  2. refack commented on Sep 11, 2018

    @refack
    Contributor

    Two new contributors saw this in the last week.
    I can't repro, but my computer is in a weird UAC situation, so I'm guessing it might be an "Elevation" issue.

  3. kfarnung commented on Sep 11, 2018

    @kfarnung
    ContributorAuthor

    That's my guess as well, the documentation doesn't call it out, but I suspect that the request for real-time priority is being downgraded transparently. I'm on Windows Insiders builds, so it's possible there's something with that as well.

  4. added
    windowsIssues and PRs related to the Windows platform.
    testIssues and PRs related to Node.js core tests and test infrastructure.
    on Sep 11, 2018
  5. bzoz commented on Sep 12, 2018

    @bzoz
    Contributor

    The test fails for normal user and succeeds for elevated one.

  6. bzoz commented on Sep 12, 2018

    @bzoz
    Contributor

    Fix in #22817

  7. richardlau commented on Sep 12, 2018

    @richardlau
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testIssues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions