Skip to content

Commit 4bd0187

Browse files
committed
test: handle uv_os_setpriority() windows edge case
Refs: nodejs/node#22817 Refs: libuv/help#64 PR-URL: libuv#2002 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
1 parent 3dc0f53 commit 4bd0187

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/test-process-priority.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ TEST_IMPL(process_priority) {
5454
#ifndef _WIN32
5555
ASSERT(priority == i);
5656
#else
57+
/* On Windows, only elevated users can set UV_PRIORITY_HIGHEST. Other
58+
users will silently be set to UV_PRIORITY_HIGH. */
5759
if (i < UV_PRIORITY_HIGH)
58-
ASSERT(priority == UV_PRIORITY_HIGHEST);
60+
ASSERT(priority == UV_PRIORITY_HIGHEST || priority == UV_PRIORITY_HIGH);
5961
else if (i < UV_PRIORITY_ABOVE_NORMAL)
6062
ASSERT(priority == UV_PRIORITY_HIGH);
6163
else if (i < UV_PRIORITY_NORMAL)

0 commit comments

Comments
 (0)