mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
tests: Remove an unnecessary timeout in gnotification test
This is a fallback timeout to abort the test if the expected number of messages aren’t seen in time. However, when running the test under valgrind it will take longer and sometimes spuriously trigger the timeout. There’s no point in having an abort timeout inside the test: the test runner (Meson) already provides one for us, which we can adjust with a multiplier when running under valgrind. So removes the timeout from within the test. This should fix the gnotification test under valgrind. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
4282f22102
commit
33f36af489
@ -136,16 +136,6 @@ server_notify_is_running (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
timeout (gpointer user_data)
|
||||
{
|
||||
GNotificationServer *server = user_data;
|
||||
|
||||
g_notification_server_stop (server);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
basic (void)
|
||||
{
|
||||
@ -162,7 +152,6 @@ basic (void)
|
||||
g_signal_connect (server, "notification-received", G_CALLBACK (notification_received), &received_count);
|
||||
g_signal_connect (server, "notification-removed", G_CALLBACK (notification_removed), &removed_count);
|
||||
g_signal_connect (server, "notify::is-running", G_CALLBACK (server_notify_is_running), loop);
|
||||
g_timeout_add_seconds (1, timeout, server);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user