Commit 54f04370 authored by Kevin Puetz's avatar Kevin Puetz Committed by Alexandre Julliard

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: 's avatarKevin Puetz <PuetzKevinA@JohnDeere.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1fc8a8f2
......@@ -2772,8 +2772,9 @@ static DWORD CALLBACK test_CoWaitForMultipleHandles_thread(LPVOID arg)
ok(thread != NULL, "CreateThread failed, error %u\n", GetLastError());
hr = CoWaitForMultipleHandles(0, 50, 1, &event, &index);
ok(hr == RPC_S_CALLPENDING, "expected RPC_S_CALLPENDING, got 0x%08x\n", hr);
index = WaitForSingleObject(thread, 200);
ok(index == WAIT_OBJECT_0, "WaitForSingleObject failed\n");
hr = CoWaitForMultipleHandles(0, 200, 1, &thread, &index);
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);
hr = CoRegisterMessageFilter(NULL, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment