From 6f2c0c89a36ce29d99926c8f1ce1e28a01daa6dc Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 24 Aug 2021 00:27:52 +0200 Subject: Replace deprecated pre-processor symbols --- tests/notification-fixture.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/notification-fixture.h b/tests/notification-fixture.h index cbce9ff..ec4a8c5 100644 --- a/tests/notification-fixture.h +++ b/tests/notification-fixture.h @@ -308,6 +308,20 @@ protected: g_clear_object(&powerd_mock); g_clear_object(¬ify_mock); g_clear_object(&as_mock); + g_clear_object(&service); + g_object_unref(session_bus); + g_object_unref(system_bus); + + // wait a little while for the scaffolding to shut down, + // but don't block on it forever... + unsigned int cleartry = 0; + while (((system_bus != nullptr) || (session_bus != nullptr)) && (cleartry < 50)) + { + g_usleep(100000); + while (g_main_context_pending(nullptr)) + g_main_context_iteration(nullptr, true); + cleartry++; + } super::TearDown(); } -- cgit v1.2.3