[gvfs] gvfs-test: Don't wait for GVolumeMonitor "mount-removed" signal
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] gvfs-test: Don't wait for GVolumeMonitor "mount-removed" signal
- Date: Tue, 5 Feb 2013 17:29:50 +0000 (UTC)
commit b9c3d2c11c854ca9c3b173fe8cebab21bfaa46d4
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Feb 5 18:23:52 2013 +0100
gvfs-test: Don't wait for GVolumeMonitor "mount-removed" signal
With implementing proper unmount method in the last commit the mount
should be gone when GVfsJobUnmount returns. It's not guaranteed when
the "mount-removed" signal is received to the application.
Let's not wait for the "mount-removed" signal, a return value from
g_file_unmount_mountable_with_operation_finish() should be enough to
indicate success or error.
https://bugzilla.gnome.org/show_bug.cgi?id=691568
test/gvfs-test | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 5950088..58f85fc 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -222,20 +222,13 @@ class GvfsTestCase(unittest.TestCase):
def unmount_done(obj, result, main_loop):
success = obj.unmount_with_operation_finish(result)
self.cb_result = (obj, success)
-
- def mount_removed(vm, m, main_loop):
- if m.get_name() == mount.get_name():
- main_loop.quit()
+ main_loop.quit()
mount = gfile.find_enclosing_mount(None)
self.assertNotEqual(mount, None)
ml = GLib.MainLoop()
- # the mount is not really gone after unmount_done() gets called, so we
- # need to wait until it is really removed
- vm = Gio.VolumeMonitor.get()
- vm.connect('mount-removed', mount_removed, ml)
mount.unmount_with_operation(Gio.MountUnmountFlags.NONE, None, None,
unmount_done, ml)
# ensure we are timing out
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]