diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-09-22 18:32:09 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-21 12:37:45 +0100 |
commit | 72e865d96b266cc8c9c0586fff2a36382b23d7ec (patch) | |
tree | c1476acdeea7728ff137a5d345da5e5462e47578 | |
parent | 48e799e7184722047c4944ab16dc37751cc89227 (diff) | |
download | dbus-glib-72e865d96b266cc8c9c0586fff2a36382b23d7ec.tar.gz |
registrations test: run the connections to completion and call dbus_shutdown
This frees more of the memory.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | test/core/registrations.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/core/registrations.c b/test/core/registrations.c index 8aa711c..785c7cc 100644 --- a/test/core/registrations.c +++ b/test/core/registrations.c @@ -42,6 +42,8 @@ #include "my-object.h" +#include "test/lib/util.h" + GMainLoop *loop = NULL; typedef struct { @@ -89,13 +91,13 @@ teardown (Fixture *f, * in test_lookup() */ if (f->bus != NULL) { - dbus_connection_close (dbus_g_connection_get_connection (f->bus)); + test_run_until_disconnected (f->bus, NULL); dbus_g_connection_unref (f->bus); } if (f->bus2 != NULL) { - dbus_connection_close (dbus_g_connection_get_connection (f->bus2)); + test_run_until_disconnected (f->bus2, NULL); dbus_g_connection_unref (f->bus2); } @@ -107,6 +109,8 @@ teardown (Fixture *f, /* This is safe to call on an initialized-but-unset DBusError, a bit like * g_clear_error */ dbus_error_free (&f->dbus_error); + + dbus_shutdown (); } static void |