kernel32/tests: Avoid a race in test_WaitForJobObject().

Waiting for and closing the job object does not kill the child process
which then may print its 'tests executed' line at the same time as the
parent traces, sometimes mangling failure messages.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2020-02-24 05:03:29 +01:00 committed by Alexandre Julliard
parent 1e55b2c252
commit 995b44fe61
1 changed files with 1 additions and 0 deletions

View File

@ -2809,6 +2809,7 @@ static void test_WaitForJobObject(void)
dwret = WaitForSingleObject(job, 100);
ok(dwret == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", dwret);
WaitForSingleObject(pi.hProcess, 1000);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
CloseHandle(job);