From 6ca7284a5498259bebac10b5163859eb86aa4b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 11 Apr 2011 12:04:34 +0100 Subject: [PATCH] tests: allow more time for the test_many_bins pipeline to preroll Hopefully makes this test work on the OSX build bot and other not-so-powerful machines. https://bugzilla.gnome.org/show_bug.cgi?id=646624 --- tests/check/gst/gstbin.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c index ea942a9b9a..bf0d206d69 100644 --- a/tests/check/gst/gstbin.c +++ b/tests/check/gst/gstbin.c @@ -1137,11 +1137,15 @@ GST_START_TEST (test_many_bins) fail_unless (gst_element_link (last_bin, sink)); ret = gst_element_set_state (pipeline, GST_STATE_PLAYING); - fail_unless (ret == GST_STATE_CHANGE_ASYNC, "did not get state change async"); + fail_unless_equals_int (ret, GST_STATE_CHANGE_ASYNC); - ret = gst_element_get_state (pipeline, NULL, NULL, 5 * GST_SECOND); - fail_unless (ret == GST_STATE_CHANGE_SUCCESS, - "did not get state change success"); + for (i = 0; i < 15; ++i) { + GST_INFO ("waiting for preroll ..."); + ret = gst_element_get_state (pipeline, NULL, NULL, GST_SECOND); + if (ret != GST_STATE_CHANGE_ASYNC) + break; + } + fail_unless_equals_int (ret, GST_STATE_CHANGE_SUCCESS); gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline);