diff options
Diffstat (limited to 'test')
-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 |