From f760b3318a8520c612cbceab64eb3112d3bd95a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 11 Dec 2011 15:03:17 +0000 Subject: [PATCH] tests: fix g_usleep() in camerabin2 test g_usleep() takes a microsecond value, GST_SECOND is nanoseconds, so we were sleeping for more than 3 minutes here instead of 200ms. --- tests/check/elements/camerabin2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/camerabin2.c b/tests/check/elements/camerabin2.c index 977ff26ea6..e830bfcaa9 100644 --- a/tests/check/elements/camerabin2.c +++ b/tests/check/elements/camerabin2.c @@ -633,7 +633,8 @@ wait_for_idle_state (void) if (idle) break; - g_usleep (GST_SECOND / 5); + GST_LOG ("waiting for idle state.."); + g_usleep (G_USEC_PER_SEC / 5); } fail_unless (idle); } @@ -816,6 +817,7 @@ GST_START_TEST (test_multiple_video_recordings) gst_caps_unref (caps); + GST_LOG ("starting #%d with caps %" GST_PTR_FORMAT, i, caps); g_signal_emit_by_name (camera, "start-capture", NULL); g_object_get (camera, "idle", &idle, NULL); @@ -824,15 +826,20 @@ GST_START_TEST (test_multiple_video_recordings) g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, main_loop); g_main_loop_run (main_loop); + + GST_LOG ("stopping run %d", i); g_signal_emit_by_name (camera, "stop-capture", NULL); msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); fail_unless (msg != NULL); gst_message_unref (msg); + GST_LOG ("video done, checking preview image"); check_preview_image (camera, video_filename, i); + GST_LOG ("waiting for idle state"); wait_for_idle_state (); + GST_LOG ("finished run %d", i); } gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL);