aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2016-02-10 20:49:07 -0600
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commit8a5815d92048f84581cc6802c1689f06c7df24f0 (patch)
tree378715ae410bdc63aeef0f990997c35d982450c1 /tests
parent62f4861b11ba7e3c58c75cf574cc999e623b4247 (diff)
downloadayatana-indicator-datetime-8a5815d92048f84581cc6802c1689f06c7df24f0.tar.gz
ayatana-indicator-datetime-8a5815d92048f84581cc6802c1689f06c7df24f0.tar.bz2
ayatana-indicator-datetime-8a5815d92048f84581cc6802c1689f06c7df24f0.zip
in test-notifications we do need one wait() wart after all, because the Snap is building its impl proxies asynchronously and hasn't any public way of notifying when they're built
Diffstat (limited to 'tests')
-rw-r--r--tests/test-notification.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/tests/test-notification.cpp b/tests/test-notification.cpp
index a51267f..775d6d5 100644
--- a/tests/test-notification.cpp
+++ b/tests/test-notification.cpp
@@ -38,17 +38,6 @@ namespace
g_main_loop_quit(static_cast<GMainLoop*>(gloop));
return G_SOURCE_REMOVE;
}
-
- void on_dbus_signal(GDBusConnection* /*connection*/,
- const gchar* /*sender_name*/,
- const gchar* /*object_path*/,
- const gchar* /*interface_name*/,
- const gchar* /*signal_name*/,
- GVariant* /*parameters*/,
- gpointer gloop)
- {
- g_main_loop_quit(static_cast<GMainLoop*>(gloop));
- }
}
/***
@@ -147,25 +136,13 @@ TEST_F(NotificationFixture,Notification)
// set test case properties: other-vibrations flag
// (and wait for the PropertiesChanged signal so we know the dbusmock got it)
- ASSERT_NAME_OWNED_EVENTUALLY(system_bus, AS_BUSNAME);
- const auto subscription_id = g_dbus_connection_signal_subscribe(system_bus,
- AS_BUSNAME,
- "org.freedesktop.DBus.Properties",
- "PropertiesChanged",
- nullptr, /* object_path */
- "com.lomiri.touch.AccountsService.Sound",
- G_DBUS_SIGNAL_FLAGS_NONE,
- on_dbus_signal,
- loop,
- nullptr /*user_data_free_func*/);
dbus_test_dbus_mock_object_update_property(as_mock,
as_obj,
PROP_OTHER_VIBRATIONS,
g_variant_new_boolean(test_vibes.other_vibrations),
&error);
g_assert_no_error(error);
- g_main_loop_run(loop);
- g_dbus_connection_signal_unsubscribe(system_bus, subscription_id);
+ wait_msec(100);
// run the test
(*snap)(test_appt.appt, appt.alarms.front(), func, func);