Complete GNOME plugin shutdown in pipeline regression fixture
This commit is contained in:
parent
90e69c25b5
commit
56c2e9ba86
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,12 @@ static GMainLoop *loop;
|
|||
static GsAppList *result_list;
|
||||
static GError *result_error;
|
||||
static gboolean update_result;
|
||||
static void shutdown_completed (GObject *source, GAsyncResult *result, gpointer data)
|
||||
{
|
||||
g_assert_true (gs_plugin_shutdown_finish (GS_PLUGIN (source), result, &result_error));
|
||||
g_assert_no_error (result_error);
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
static void updated (GObject *source, GAsyncResult *result, gpointer data)
|
||||
{
|
||||
update_result = update_finish (GS_PLUGIN (source), result, &result_error);
|
||||
|
|
@ -73,6 +79,8 @@ int main (void)
|
|||
g_assert_null (result_list);
|
||||
g_assert_error (result_error, GS_PLUGIN_ERROR, GS_PLUGIN_ERROR_FAILED);
|
||||
g_clear_error (&result_error);
|
||||
gs_plugin_shutdown_async (plugin, NULL, shutdown_completed, NULL);
|
||||
g_main_loop_run (loop);
|
||||
g_main_loop_unref (loop);
|
||||
g_clear_object (&plugin);
|
||||
g_clear_object (&bus);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue