mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
gio/tests/gdbus-proxy: test_proxy: check the server is properly killed
We kill the test service at the end of this test. Let's also ensure that the name on the bus goes away and that we are notified about this happening.
This commit is contained in:
parent
7aa83536af
commit
63038d1e4c
@ -766,6 +766,7 @@ test_proxy (void)
|
||||
GDBusProxy *proxy;
|
||||
GDBusConnection *connection;
|
||||
GError *error;
|
||||
gchar *owner;
|
||||
|
||||
error = NULL;
|
||||
connection = g_bus_get_sync (G_BUS_TYPE_SESSION,
|
||||
@ -783,7 +784,7 @@ test_proxy (void)
|
||||
&error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
/* this is safe; testserver will exit once the bus goes away */
|
||||
/* this is safe; we explicitly kill the service later on */
|
||||
g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
|
||||
|
||||
_g_assert_property_notify (proxy, "g-name-owner");
|
||||
@ -794,8 +795,15 @@ test_proxy (void)
|
||||
test_signals (proxy);
|
||||
test_expected_interface (proxy);
|
||||
|
||||
g_object_unref (proxy);
|
||||
kill_test_service (connection);
|
||||
|
||||
_g_assert_property_notify (proxy, "g-name-owner");
|
||||
|
||||
owner = g_dbus_proxy_get_name_owner (proxy);
|
||||
g_assert_null (owner);
|
||||
g_free (owner);
|
||||
|
||||
g_object_unref (proxy);
|
||||
g_object_unref (connection);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user