https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ec9f3d82b0300bb59e115d2a58a29c1612315d8b

commit ec9f3d82b0300bb59e115d2a58a29c1612315d8b
Author:     Colin Finck <co...@reactos.org>
AuthorDate: Sat Feb 20 17:39:23 2021 +0100
Commit:     Colin Finck <co...@reactos.org>
CommitDate: Tue Mar 2 19:32:20 2021 +0100

    [NTDLL_APITEST] Ensure that some noticeable time has passed since process 
creation to fix a flaky test.
---
 modules/rostests/apitests/ntdll/NtQueryInformationProcess.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c 
b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
index 94a07f17589..777f8f36810 100644
--- a/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
+++ b/modules/rostests/apitests/ntdll/NtQueryInformationProcess.c
@@ -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);
 

Reply via email to