ole32/tests: Fix flaky test in cowait_unmarshal_thread.
When run with runtest -q (WINETEST_DEBUG=0) it passed within the first 50ms, but with any verbose logging it sometimes failed. Use CoWaitForMultipleHandles (which keeps pumping the STA) since cowait_unmarshal_thread only releases its marshaled unk at the end, so it needs to be able to call back in order to exit cleanly. Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1fc8a8f234
commit
54f04370eb
|
@ -2772,8 +2772,9 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg)
|
||||||
ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
|
ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
|
||||||
hr = CoWaitForMultipleHandles(0, 50, 1, &event, &index);
|
hr = CoWaitForMultipleHandles(0, 50, 1, &event, &index);
|
||||||
ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
|
ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
|
||||||
index = WaitForSingleObject(thread, 200);
|
hr = CoWaitForMultipleHandles(0, 200, 1, &thread, &index);
|
||||||
ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
|
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
|
||||||
|
ok(index == WAIT_OBJECT_0, "cowait_unmarshal_thread didn't finish");
|
||||||
CloseHandle(thread);
|
CloseHandle(thread);
|
||||||
|
|
||||||
hr = CoRegisterMessageFilter(NULL, NULL);
|
hr = CoRegisterMessageFilter(NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue