summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2013-02-05 18:23:52 +0100
committerTomas Bzatek <tbzatek@redhat.com>2013-02-05 18:23:52 +0100
commitb9c3d2c11c854ca9c3b173fe8cebab21bfaa46d4 (patch)
tree19cf5977cb6a6b91b61ee7eab20949068d94d514 /test
parent62ba3def657a053c0a8aa805e7e3fe3a25d3759d (diff)
downloadgvfs-b9c3d2c11c854ca9c3b173fe8cebab21bfaa46d4.tar.gz
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
Diffstat (limited to 'test')
-rwxr-xr-xtest/gvfs-test9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/gvfs-test b/test/gvfs-test
index 5950088c..58f85fc2 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