test-os-process-priority failing on my Windows machine #22799
Copy link
Copy link
Closed
Labels
testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
- 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
-20It seems like although I'm asking for the highest priority Windows is pushing me down a level.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testIssues and PRs related to Node.js core tests and test infrastructure.Issues and PRs related to Node.js core tests and test infrastructure.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Activity
kfarnung commentedon Sep 10, 2018
Looks like this API was added by @cjihrig in #22407, is anyone else having issues with this test on Windows?
test: mark `test-os-process-priority` flaky
refack commentedon Sep 11, 2018
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.
kfarnung commentedon Sep 11, 2018
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.
test: mark `test-os-process-priority` flaky
test: mark `test-os-process-priority` flaky
test: mark `test-os-process-priority` flaky
bzoz commentedon Sep 12, 2018
The test fails for normal user and succeeds for elevated one.
bzoz commentedon Sep 12, 2018
Fix in #22817
richardlau commentedon Sep 12, 2018
Is this related to the
SeIncreaseBasePriorityPrivilegeuser privilege?doc, win: improve os.setPriority documentation