From: Francois Gouget fgouget@codeweavers.com
--- My understanding is that the failures in quartz:filtergraph are caused by scheduling delays, except maybe the EOS test? If so, then that means the issue is not in the test itself and comes from an external source (other processes) which corresponds to a tryok() use case. So far we've used flaky() to avoid failures. This commit is a test to see if tryok() is a workable replacement mechanism. --- dlls/quartz/tests/filtergraph.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 00232ea7a52..77f7cd0a9cb 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -430,8 +430,7 @@ static void test_state_change(IFilterGraph2 *graph) hr = IMediaControl_Pause(control); ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - flaky_wine - ok(hr == S_OK, "Got hr %#lx.\n", hr); + tryok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %ld.\n", state);
hr = IMediaControl_Run(control); @@ -520,13 +519,11 @@ static void test_media_event(IFilterGraph2 *graph) } } } - flaky_wine - ok(got_eos, "didn't get EOS\n"); + tryok(got_eos, "didn't get EOS\n");
hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); ok(hr == S_OK, "Got hr %#lx.\n", hr); - flaky_wine - ok(current == stop, "expected %s, got %s\n", wine_dbgstr_longlong(stop), wine_dbgstr_longlong(current)); + tryok(current == stop, "expected %s, got %s\n", wine_dbgstr_longlong(stop), wine_dbgstr_longlong(current));
hr = IMediaControl_Stop(control); ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); @@ -547,8 +544,8 @@ static void rungraph(IFilterGraph2 *graph, BOOL video) if (video) test_basic_video(graph); test_media_seeking(graph); - test_state_change(graph); - test_media_event(graph); + LOOP_ON_FLAKY_WINE_TESTS(5) test_state_change(graph); + LOOP_ON_FLAKY_WINE_TESTS(5) test_media_event(graph); }
static HRESULT test_graph_builder_connect_file(WCHAR *filename, BOOL audio, BOOL video)