diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-02-01 15:11:07 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-02-01 15:12:44 +0100 |
commit | 5b96cf7d00194fa99dedf504c7e36e2e2ee80a28 (patch) | |
tree | 4db71f75cc5fdf7e05d5c55c8d11bec140f3fd4a /test | |
parent | c71f53ace39950fff3a424ba52c97dc557296cfa (diff) | |
download | gvfs-5b96cf7d00194fa99dedf504c7e36e2e2ee80a28.tar.gz |
tests: Fix race condition in Drive tests
In load_image(), process all pending main loop events to get an up to date
volume monitor. Not doing that can cause tests to still see the temporarily
added and removed device that was created for loading the image.
Diffstat (limited to 'test')
-rwxr-xr-x | test/gvfs-test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/gvfs-test b/test/gvfs-test index 97172151..5950088c 100755 --- a/test/gvfs-test +++ b/test/gvfs-test @@ -930,6 +930,9 @@ class Drive(GvfsTestCase): time.sleep(0.2) # flush volume monitor output + ctx = GLib.MainContext().default() + while ctx.iteration(False): + pass self.monitor.stdout.readall() def setUp(self): |