summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-02-03 13:08:55 +0000
committerMartyn Russell <martyn@lanedo.com>2012-02-03 13:08:55 +0000
commitb4888bb1391d200a1705a453b5e5019a1d673ae4 (patch)
tree2ad1e5f507c7952dee00f9c369b94fa8db3dded9
parenta6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 (diff)
downloadtracker-b4888bb1391d200a1705a453b5e5019a1d673ae4.tar.gz
tests: Fix tracker-file-notifier-test
We need to use the TRACKER_DIRECTORY_FLAG_CHECK_MTIME flag to ensure the notifier actually picks up on the changes. Fixes GB#667787.
-rw-r--r--tests/libtracker-miner/tracker-file-notifier-test.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/tests/libtracker-miner/tracker-file-notifier-test.c b/tests/libtracker-miner/tracker-file-notifier-test.c
index aa5678000..7af23183e 100644
--- a/tests/libtracker-miner/tracker-file-notifier-test.c
+++ b/tests/libtracker-miner/tracker-file-notifier-test.c
@@ -408,7 +408,7 @@ test_file_notifier_crawling_non_recursive (TestCommonContext *fixture,
CREATE_UPDATE_FILE (fixture, "non-recursive/bbb");
test_common_context_index_dir (fixture, "non-recursive",
- TRACKER_DIRECTORY_FLAG_NONE);
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
@@ -435,7 +435,8 @@ test_file_notifier_crawling_recursive (TestCommonContext *fixture,
CREATE_UPDATE_FILE (fixture, "recursive/bbb");
test_common_context_index_dir (fixture, "recursive",
- TRACKER_DIRECTORY_FLAG_RECURSE);
+ TRACKER_DIRECTORY_FLAG_RECURSE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
@@ -469,9 +470,11 @@ test_file_notifier_crawling_non_recursive_within_recursive (TestCommonContext *f
CREATE_UPDATE_FILE (fixture, "recursive/folder/non-recursive/folder/ddd");
test_common_context_index_dir (fixture, "recursive",
- TRACKER_DIRECTORY_FLAG_RECURSE);
+ TRACKER_DIRECTORY_FLAG_RECURSE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
test_common_context_index_dir (fixture, "recursive/folder/non-recursive",
- TRACKER_DIRECTORY_FLAG_NONE);
+ TRACKER_DIRECTORY_FLAG_NONE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
@@ -505,9 +508,11 @@ test_file_notifier_crawling_recursive_within_non_recursive (TestCommonContext *f
CREATE_UPDATE_FILE (fixture, "non-recursive/folder/recursive/folder/ddd");
test_common_context_index_dir (fixture, "non-recursive/folder/recursive",
- TRACKER_DIRECTORY_FLAG_RECURSE);
+ TRACKER_DIRECTORY_FLAG_RECURSE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
test_common_context_index_dir (fixture, "non-recursive",
- TRACKER_DIRECTORY_FLAG_NONE);
+ TRACKER_DIRECTORY_FLAG_NONE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
@@ -539,9 +544,11 @@ test_file_notifier_crawling_ignore_within_recursive (TestCommonContext *fixture,
CREATE_UPDATE_FILE (fixture, "recursive/folder/ignore/folder/ddd");
test_common_context_index_dir (fixture, "recursive",
- TRACKER_DIRECTORY_FLAG_RECURSE);
+ TRACKER_DIRECTORY_FLAG_RECURSE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
test_common_context_index_dir (fixture, "recursive/folder/ignore",
- TRACKER_DIRECTORY_FLAG_IGNORE);
+ TRACKER_DIRECTORY_FLAG_IGNORE |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
@@ -646,7 +653,8 @@ test_file_notifier_monitor_updates_non_recursive (TestCommonContext *fixture,
CREATE_UPDATE_FILE (fixture, "non-recursive/bbb");
test_common_context_index_dir (fixture, "non-recursive",
- TRACKER_DIRECTORY_FLAG_MONITOR);
+ TRACKER_DIRECTORY_FLAG_MONITOR |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
test_common_context_expect_results (fixture, expected_results,
@@ -693,7 +701,8 @@ test_file_notifier_monitor_updates_recursive (TestCommonContext *fixture,
test_common_context_index_dir (fixture, "recursive",
TRACKER_DIRECTORY_FLAG_RECURSE |
- TRACKER_DIRECTORY_FLAG_MONITOR);
+ TRACKER_DIRECTORY_FLAG_MONITOR |
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
tracker_file_notifier_start (fixture->notifier);
test_common_context_expect_results (fixture, expected_results,