[NTDLL_APITEST] Ensure that some noticeable time has passed since process creation to fix a flaky test.

This commit is contained in:
Colin Finck 2021-02-20 17:39:23 +01:00
parent fa0c63bc48
commit ec9f3d82b0

View file

@ -119,7 +119,6 @@ Test_ProcessTimes(void)
sizeof(KERNEL_USER_TIMES),
NULL);
ok_hex(Status, STATUS_SUCCESS);
ros_skip_flaky
ok(Times1.CreateTime.QuadPart < TestStartTime.QuadPart,
"CreateTime is %I64u, expected < %I64u\n", Times1.CreateTime.QuadPart, TestStartTime.QuadPart);
ok(Times1.CreateTime.QuadPart > TestStartTime.QuadPart - 100000000LL,
@ -327,6 +326,9 @@ START_TEST(NtQueryInformationProcess)
{
NTSTATUS Status;
/* Make sure that some time has passed since process creation, even if the resolution of our NtQuerySystemTime is low. */
Sleep(1);
Status = NtQuerySystemTime(&TestStartTime);
ok_hex(Status, STATUS_SUCCESS);