[tracker/sam/functional-test-fixes: 28/28] functional-tests: Hack 600-applications-camera into working on my machine
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-test-fixes: 28/28] functional-tests: Hack 600-applications-camera into working on my machine
- Date: Sat, 2 Aug 2014 02:44:58 +0000 (UTC)
commit 8a925f21be51668c979ec05782787c468887ac11
Author: Sam Thursfield <sam afuera me uk>
Date: Mon Jul 21 21:38:47 2014 +0100
functional-tests: Hack 600-applications-camera into working on my machine
Seems that fs miner sometimes ignores deletes if they come quickly after
creations. But, this only seems to be for photos, and not videos. Further,
if the time.sleep(2) call is added to the videos tests, they *stop* working
due to the delete not really taking effect. Things are very broken in this
area, it seems.
tests/functional-tests/600-applications-camera.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/600-applications-camera.py
b/tests/functional-tests/600-applications-camera.py
index b6495e1..8f5e2cf 100755
--- a/tests/functional-tests/600-applications-camera.py
+++ b/tests/functional-tests/600-applications-camera.py
@@ -24,6 +24,7 @@ Tests trying to simulate the behaviour of applications working with tracker
import os
import random
+import time
import unittest2 as ut
from common.utils.applicationstest import CommonTrackerApplicationTest as CommonTrackerApplicationTest
@@ -143,6 +144,11 @@ class TrackerCameraPicturesApplicationTests (TrackerCameraTestSuite):
dest_id, dest_urn = self.system.store.await_resource_inserted ('nmm:Photo', dest_fileuri)
self.assertEquals (self.get_urn_count_by_url (dest_fileuri), 1)
+ # FIXME: Necessary for the delete to be picked up by tracker-miner-fs.
+ # This indicates a bug in tracker-miner-fs -- perhaps if a delete comes
+ # very soon after a create, the delete is missed.
+ time.sleep(2)
+
# Clean the new file so the test directory is as before
log ("Remove and wait")
os.remove (dest_filepath)
@@ -189,6 +195,11 @@ class TrackerCameraPicturesApplicationTests (TrackerCameraTestSuite):
dest_id, dest_urn = self.system.store.await_resource_inserted ('nmm:Photo', dest_fileuri)
self.assertEquals (self.get_urn_count_by_url (dest_fileuri), 1)
+ # FIXME: Necessary for the delete to be picked up by tracker-miner-fs.
+ # This indicates a bug in tracker-miner-fs -- perhaps if a delete comes
+ # very soon after a create, the delete is missed.
+ time.sleep(2)
+
# Clean the new file so the test directory is as before
log ("Remove and wait")
os.remove (dest_filepath)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]