test: handle uv_os_setpriority() windows edge case
Refs: https://github.com/nodejs/node/pull/22817 Refs: https://github.com/libuv/help/issues/64 PR-URL: https://github.com/libuv/libuv/pull/2002 Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
This commit is contained in:
parent
3dc0f53965
commit
4bd01873eb
@ -54,8 +54,10 @@ TEST_IMPL(process_priority) {
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
ASSERT(priority == i);
|
ASSERT(priority == i);
|
||||||
#else
|
#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)
|
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)
|
else if (i < UV_PRIORITY_ABOVE_NORMAL)
|
||||||
ASSERT(priority == UV_PRIORITY_HIGH);
|
ASSERT(priority == UV_PRIORITY_HIGH);
|
||||||
else if (i < UV_PRIORITY_NORMAL)
|
else if (i < UV_PRIORITY_NORMAL)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user