diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in index d975e34af..f0b7a2515 100755 --- a/gio/tests/memory-monitor-dbus.py.in +++ b/gio/tests/memory-monitor-dbus.py.in @@ -57,6 +57,14 @@ try: fcntl.fcntl(self.p_mock.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK) self.last_warning = -1 self.dbusmock = dbus.Interface(self.obj_lmm, dbusmock.MOCK_IFACE) + + try: + self.wait_for_bus_object('org.freedesktop.LowMemoryMonitor', + '/org/freedesktop/LowMemoryMonitor', + system_bus=True) + except: + raise + self.memory_monitor = Gio.MemoryMonitor.dup_default() assert("GMemoryMonitorDBus" in str(self.memory_monitor)) self.memory_monitor.connect("low-memory-warning", self.memory_warning_cb)