kernel32/tests: Wait for threads to terminate.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2017-07-10 11:17:10 +02:00
parent 40b7091ec5
commit 8d51efc7b9
1 changed files with 12 additions and 0 deletions

View File

@ -1506,6 +1506,8 @@ static void test_WaitCts(void)
args[1] = CLRRTS;
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
/* Change the Comm Mask while a Wait is going on
@ -1588,6 +1590,8 @@ static void test_AbortWaitCts(void)
"Unexpected time %d, expected around %d\n", diff, TIMEOUT>>1);
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
/*
@ -1668,6 +1672,8 @@ static void test_WaitDsr(void)
args[1] = CLRDTR;
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
/*
@ -1754,6 +1760,8 @@ static void test_WaitRing(void)
args[1] = CLRDTR;
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
/*
* Wait for a change in DCD
@ -1833,6 +1841,8 @@ static void test_WaitDcd(void)
args[1] = CLRDTR;
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
/*
@ -1914,6 +1924,8 @@ static void test_WaitBreak(void)
ok(ClearCommBreak(hcom), "ClearCommBreak failed\n");
CloseHandle(hcom);
ok( !WaitForSingleObject( alarmThread, 10000 ), "thread still running\n" );
CloseHandle( alarmThread );
}
static void test_stdio(void)