Skip to content
  • Phaedrus Leeds's avatar
    gdbus-connection-loss: Fix test failure · 59ce6b10
    Phaedrus Leeds authored
    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.
    59ce6b10