mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 12:41:50 +01:00
gdbus-connection-loss: Fix test failure
Now that we're not calling g_object_run_dispose() indirectly in g_test_dbus_down() (see commit "Revert "gtestdbus: Properly close server connections""), the test gdbus-connection-loss is failing with the message "Bail out! GLib-GIO-FATAL-WARNING: Weak notify timeout, object ref_count=1". This is because we're holding a reference to the singleton connection object while calling session_bus_down() in the test's main(). So then we end up waiting for 30 seconds in _g_object_unref_and_wait_weak_notify() for the GWeakNotify to be triggered, which never happens. The fix is to unref the connection before calling session_bus_down(). This is consistent with how other tests work, and is safe because the only method called on the connection has already errored out, as asserted by the test.
This commit is contained in:
parent
1c63d5d539
commit
59ce6b10dc
@ -136,9 +136,10 @@ main (int argc,
|
||||
|
||||
ret = g_test_run();
|
||||
|
||||
g_object_unref (c);
|
||||
|
||||
session_bus_down ();
|
||||
|
||||
g_object_unref (c);
|
||||
g_main_loop_unref (loop);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user