Skip to content

Commit

Permalink
test: handle uv_os_setpriority() windows edge case
Browse files Browse the repository at this point in the history
Refs: nodejs/node#22817
Refs: libuv/help#64
PR-URL: libuv#2002
Reviewed-By: Bartosz Sosnowski <[email protected]>
  • Loading branch information
cjihrig committed Sep 26, 2018
1 parent 3dc0f53 commit 4bd0187
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/test-process-priority.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ TEST_IMPL(process_priority) {
#ifndef _WIN32
ASSERT(priority == i);
#else
/* On Windows, only elevated users can set UV_PRIORITY_HIGHEST. Other
users will silently be set to UV_PRIORITY_HIGH. */
if (i < UV_PRIORITY_HIGH)
ASSERT(priority == UV_PRIORITY_HIGHEST);
ASSERT(priority == UV_PRIORITY_HIGHEST || priority == UV_PRIORITY_HIGH);
else if (i < UV_PRIORITY_ABOVE_NORMAL)
ASSERT(priority == UV_PRIORITY_HIGH);
else if (i < UV_PRIORITY_NORMAL)
Expand Down

0 comments on commit 4bd0187

Please sign in to comment.