[tracker/sam/functional-test-fixes: 10/18] functional-tests: Fix 300-miner-basic-ops (PARTLY)
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/sam/functional-test-fixes: 10/18] functional-tests: Fix 300-miner-basic-ops (PARTLY)
- Date: Thu, 31 Jul 2014 13:28:58 +0000 (UTC)
commit 791baf86d8137a323ce1f7b53abc829b51938923
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Jul 20 17:19:26 2014 +0100
functional-tests: Fix 300-miner-basic-ops (PARTLY)
tests/functional-tests/300-miner-basic-ops.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tests/functional-tests/300-miner-basic-ops.py b/tests/functional-tests/300-miner-basic-ops.py
index 124e992..33c06be 100755
--- a/tests/functional-tests/300-miner-basic-ops.py
+++ b/tests/functional-tests/300-miner-basic-ops.py
@@ -205,7 +205,7 @@ class MinerCrawlTest (CommonTrackerMinerTest):
"""
source = os.path.join (MINER_TMP_DIR, "test-monitored", "dir1", "file2.txt")
dest = os.path.join (MINER_TMP_DIR, "test-no-monitored", "file2.txt")
- source_id = self.system.store.get_resource_id (path_to_url(dest))
+ source_id = self.system.store.get_resource_id (path_to_url(source))
shutil.move (source, dest)
self.system.store.await_resource_deleted (source_id)
@@ -233,7 +233,9 @@ class MinerCrawlTest (CommonTrackerMinerTest):
self.assertEquals (source_dir_urn, parent_before)
shutil.move (source, dest)
- self.system.store.await_resource_inserted ('nfo:TextDocument', path_to_url(dest))
+ # FIXME: resource won't be inserted, just the nie:url field updated.
+ # For now, use wait_for_idle :(
+ self.system.tracker_miner_fs_wait_for_idle ()
# Checking fix for NB#214413: After a move operation, nfo:belongsToContainer
# should be changed to the new one
@@ -285,9 +287,11 @@ class MinerCrawlTest (CommonTrackerMinerTest):
Delete a directory
"""
victim = os.path.join (MINER_TMP_DIR, "test-monitored", "dir1")
- victim_id = self.system.store.get_resource_id (path_to_url(victim))
shutil.rmtree (victim)
- self.system.store.await_resource_deleted (victim_id)
+
+ file_inside_victim_url = path_to_url(os.path.join (victim, "file2.txt"))
+ file_inside_victim_id = self.system.store.get_resource_id (file_inside_victim_url)
+ self.system.store.await_resource_deleted (file_inside_victim_id)
result = self.__get_text_documents ()
self.assertEquals (len (result), 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]