tests: udpsrc: fix test_udpsrc to actually run and fix locking

Previously this would silently be skipped because 1600 != 1400
and there is no assertion on this call.

Also unlock check_mutex after use.

https://bugzilla.gnome.org/show_bug.cgi?id=786799
This commit is contained in:
George Kiagiadakis 2017-08-25 14:45:52 +03:00 committed by Tim-Philipp Müller
parent 91dfc20a04
commit 45c82ee798

View file

@ -165,7 +165,7 @@ GST_START_TEST (test_udpsrc)
if (g_socket_send_to (socket, sa, data, 1600, NULL, NULL) != 1600) if (g_socket_send_to (socket, sa, data, 1600, NULL, NULL) != 1600)
goto send_failure; goto send_failure;
if (g_socket_send_to (socket, sa, data, 1600, NULL, NULL) != 1400) if (g_socket_send_to (socket, sa, data, 1400, NULL, NULL) != 1400)
goto send_failure; goto send_failure;
GST_INFO ("sent some packets"); GST_INFO ("sent some packets");
@ -218,6 +218,8 @@ GST_START_TEST (test_udpsrc)
g_list_free (buffers); g_list_free (buffers);
buffers = NULL; buffers = NULL;
g_mutex_unlock (&check_mutex);
no_socket: no_socket:
send_failure: send_failure: